From 71f32d15bbe894963750988f48b375bd56cf6309 Mon Sep 17 00:00:00 2001 From: "alecf%netscape.com" Date: Sat, 7 Sep 2002 01:17:57 +0000 Subject: [PATCH] fix for bug 158003 - custom static constructors for i18n unicode converters. r=shanjian, sr=bz, a=roc+moz --- intl/uconv/src/Makefile.in | 2 +- intl/uconv/src/nsCP1252ToUnicode.cpp | 14 +- intl/uconv/src/nsCP1252ToUnicode.h | 18 +- intl/uconv/src/nsISO88591ToUnicode.cpp | 14 +- intl/uconv/src/nsISO88591ToUnicode.h | 18 +- intl/uconv/src/nsMacRomanToUnicode.cpp | 14 +- intl/uconv/src/nsMacRomanToUnicode.h | 20 +- intl/uconv/src/nsUConvModule.cpp | 157 +--- intl/uconv/src/nsUnicodeToCP1252.cpp | 14 +- intl/uconv/src/nsUnicodeToCP1252.h | 17 +- intl/uconv/src/nsUnicodeToISO88591.cpp | 14 +- intl/uconv/src/nsUnicodeToISO88591.h | 17 +- intl/uconv/src/nsUnicodeToMacRoman.cpp | 14 +- intl/uconv/src/nsUnicodeToMacRoman.h | 18 +- intl/uconv/ucvibm/nsCP850ToUnicode.cpp | 10 +- intl/uconv/ucvibm/nsCP850ToUnicode.h | 17 +- intl/uconv/ucvibm/nsCP852ToUnicode.cpp | 13 +- intl/uconv/ucvibm/nsCP852ToUnicode.h | 16 +- intl/uconv/ucvibm/nsCP855ToUnicode.cpp | 12 +- intl/uconv/ucvibm/nsCP855ToUnicode.h | 16 +- intl/uconv/ucvibm/nsCP857ToUnicode.cpp | 13 +- intl/uconv/ucvibm/nsCP857ToUnicode.h | 15 +- intl/uconv/ucvibm/nsCP862ToUnicode.cpp | 13 +- intl/uconv/ucvibm/nsCP862ToUnicode.h | 15 +- intl/uconv/ucvibm/nsCP864ToUnicode.cpp | 13 +- intl/uconv/ucvibm/nsCP864ToUnicode.h | 15 +- intl/uconv/ucvibm/nsCP864iToUnicode.cpp | 60 +- intl/uconv/ucvibm/nsCP864iToUnicode.h | 74 +- intl/uconv/ucvibm/nsUnicodeToCP850.cpp | 13 +- intl/uconv/ucvibm/nsUnicodeToCP850.h | 15 +- intl/uconv/ucvibm/nsUnicodeToCP852.cpp | 13 +- intl/uconv/ucvibm/nsUnicodeToCP852.h | 18 +- intl/uconv/ucvibm/nsUnicodeToCP855.cpp | 13 +- intl/uconv/ucvibm/nsUnicodeToCP855.h | 17 +- intl/uconv/ucvibm/nsUnicodeToCP857.cpp | 13 +- intl/uconv/ucvibm/nsUnicodeToCP857.h | 18 +- intl/uconv/ucvibm/nsUnicodeToCP862.cpp | 13 +- intl/uconv/ucvibm/nsUnicodeToCP862.h | 18 +- intl/uconv/ucvibm/nsUnicodeToCP864.cpp | 13 +- intl/uconv/ucvibm/nsUnicodeToCP864.h | 18 +- intl/uconv/ucvibm/nsUnicodeToCP864i.cpp | 13 +- intl/uconv/ucvibm/nsUnicodeToCP864i.h | 18 +- intl/uconv/ucvja/nsUnicodeToEUCJP.cpp | 17 +- intl/uconv/ucvja/nsUnicodeToEUCJP.h | 20 +- intl/uconv/ucvja/nsUnicodeToJISx0201.cpp | 13 +- intl/uconv/ucvja/nsUnicodeToJISx0201.h | 20 +- intl/uconv/ucvja/nsUnicodeToJISx0208.cpp | 14 +- intl/uconv/ucvja/nsUnicodeToJISx0208.h | 20 +- intl/uconv/ucvja/nsUnicodeToJISx0212.cpp | 14 +- intl/uconv/ucvja/nsUnicodeToJISx0212.h | 20 +- intl/uconv/ucvja/nsUnicodeToSJIS.cpp | 15 +- intl/uconv/ucvja/nsUnicodeToSJIS.h | 20 +- intl/uconv/ucvko/nsCP949ToUnicode.cpp | 17 +- intl/uconv/ucvko/nsCP949ToUnicode.h | 19 +- intl/uconv/ucvko/nsEUCKRToUnicode.cpp | 10 +- intl/uconv/ucvko/nsEUCKRToUnicode.h | 16 +- intl/uconv/ucvko/nsJohabToUnicode.cpp | 14 +- intl/uconv/ucvko/nsJohabToUnicode.h | 19 +- intl/uconv/ucvko/nsUnicodeToCP949.cpp | 17 +- intl/uconv/ucvko/nsUnicodeToCP949.h | 19 +- intl/uconv/ucvko/nsUnicodeToEUCKR.cpp | 19 +- intl/uconv/ucvko/nsUnicodeToEUCKR.h | 19 +- intl/uconv/ucvko/nsUnicodeToJohab.cpp | 16 +- intl/uconv/ucvko/nsUnicodeToJohab.h | 18 +- intl/uconv/ucvko/nsUnicodeToJohabNoAscii.cpp | 17 +- intl/uconv/ucvko/nsUnicodeToJohabNoAscii.h | 18 +- intl/uconv/ucvko/nsUnicodeToKSC5601.cpp | 15 +- intl/uconv/ucvko/nsUnicodeToKSC5601.h | 21 +- intl/uconv/ucvlatin/nsARMSCII8ToUnicode.cpp | 13 +- intl/uconv/ucvlatin/nsARMSCII8ToUnicode.h | 18 +- intl/uconv/ucvlatin/nsAsciiToUnicode.cpp | 13 +- intl/uconv/ucvlatin/nsAsciiToUnicode.h | 18 +- intl/uconv/ucvlatin/nsCP1250ToUnicode.cpp | 13 +- intl/uconv/ucvlatin/nsCP1250ToUnicode.h | 20 +- intl/uconv/ucvlatin/nsCP1251ToUnicode.cpp | 13 +- intl/uconv/ucvlatin/nsCP1251ToUnicode.h | 18 +- intl/uconv/ucvlatin/nsCP1253ToUnicode.cpp | 13 +- intl/uconv/ucvlatin/nsCP1253ToUnicode.h | 18 +- intl/uconv/ucvlatin/nsCP1254ToUnicode.cpp | 13 +- intl/uconv/ucvlatin/nsCP1254ToUnicode.h | 18 +- intl/uconv/ucvlatin/nsCP1255ToUnicode.cpp | 13 +- intl/uconv/ucvlatin/nsCP1255ToUnicode.h | 17 +- intl/uconv/ucvlatin/nsCP1256ToUnicode.cpp | 13 +- intl/uconv/ucvlatin/nsCP1256ToUnicode.h | 17 +- intl/uconv/ucvlatin/nsCP1257ToUnicode.cpp | 13 +- intl/uconv/ucvlatin/nsCP1257ToUnicode.h | 15 +- intl/uconv/ucvlatin/nsCP1258ToUnicode.cpp | 13 +- intl/uconv/ucvlatin/nsCP1258ToUnicode.h | 18 +- intl/uconv/ucvlatin/nsCP866ToUnicode.cpp | 13 +- intl/uconv/ucvlatin/nsCP866ToUnicode.h | 18 +- intl/uconv/ucvlatin/nsCP874ToUnicode.cpp | 13 +- intl/uconv/ucvlatin/nsCP874ToUnicode.h | 18 +- intl/uconv/ucvlatin/nsGEOSTD8ToUnicode.cpp | 13 +- intl/uconv/ucvlatin/nsGEOSTD8ToUnicode.h | 18 +- intl/uconv/ucvlatin/nsISO885910ToUnicode.cpp | 14 +- intl/uconv/ucvlatin/nsISO885910ToUnicode.h | 15 +- intl/uconv/ucvlatin/nsISO885913ToUnicode.cpp | 13 +- intl/uconv/ucvlatin/nsISO885913ToUnicode.h | 18 +- intl/uconv/ucvlatin/nsISO885914ToUnicode.cpp | 13 +- intl/uconv/ucvlatin/nsISO885914ToUnicode.h | 18 +- intl/uconv/ucvlatin/nsISO885915ToUnicode.cpp | 13 +- intl/uconv/ucvlatin/nsISO885915ToUnicode.h | 18 +- intl/uconv/ucvlatin/nsISO885916ToUnicode.cpp | 13 +- intl/uconv/ucvlatin/nsISO885916ToUnicode.h | 18 +- intl/uconv/ucvlatin/nsISO88592ToUnicode.cpp | 13 +- intl/uconv/ucvlatin/nsISO88592ToUnicode.h | 18 +- intl/uconv/ucvlatin/nsISO88593ToUnicode.cpp | 13 +- intl/uconv/ucvlatin/nsISO88593ToUnicode.h | 18 +- intl/uconv/ucvlatin/nsISO88594ToUnicode.cpp | 13 +- intl/uconv/ucvlatin/nsISO88594ToUnicode.h | 18 +- intl/uconv/ucvlatin/nsISO88595ToUnicode.cpp | 13 +- intl/uconv/ucvlatin/nsISO88595ToUnicode.h | 18 +- intl/uconv/ucvlatin/nsISO88596EToUnicode.cpp | 10 +- intl/uconv/ucvlatin/nsISO88596EToUnicode.h | 18 +- intl/uconv/ucvlatin/nsISO88596IToUnicode.cpp | 10 +- intl/uconv/ucvlatin/nsISO88596IToUnicode.h | 18 +- intl/uconv/ucvlatin/nsISO88596ToUnicode.cpp | 13 +- intl/uconv/ucvlatin/nsISO88596ToUnicode.h | 18 +- intl/uconv/ucvlatin/nsISO88597ToUnicode.cpp | 13 +- intl/uconv/ucvlatin/nsISO88597ToUnicode.h | 18 +- intl/uconv/ucvlatin/nsISO88598EToUnicode.cpp | 10 +- intl/uconv/ucvlatin/nsISO88598EToUnicode.h | 18 +- intl/uconv/ucvlatin/nsISO88598IToUnicode.cpp | 10 +- intl/uconv/ucvlatin/nsISO88598IToUnicode.h | 18 +- intl/uconv/ucvlatin/nsISO88598ToUnicode.cpp | 13 +- intl/uconv/ucvlatin/nsISO88598ToUnicode.h | 18 +- intl/uconv/ucvlatin/nsISO88599ToUnicode.cpp | 13 +- intl/uconv/ucvlatin/nsISO88599ToUnicode.h | 18 +- intl/uconv/ucvlatin/nsISOIR111ToUnicode.cpp | 13 +- intl/uconv/ucvlatin/nsISOIR111ToUnicode.h | 18 +- intl/uconv/ucvlatin/nsKOI8RToUnicode.cpp | 13 +- intl/uconv/ucvlatin/nsKOI8RToUnicode.h | 18 +- intl/uconv/ucvlatin/nsKOI8UToUnicode.cpp | 13 +- intl/uconv/ucvlatin/nsKOI8UToUnicode.h | 18 +- intl/uconv/ucvlatin/nsMacArabicToUnicode.cpp | 12 +- intl/uconv/ucvlatin/nsMacArabicToUnicode.h | 18 +- intl/uconv/ucvlatin/nsMacCEToUnicode.cpp | 13 +- intl/uconv/ucvlatin/nsMacCEToUnicode.h | 18 +- .../uconv/ucvlatin/nsMacCroatianToUnicode.cpp | 13 +- intl/uconv/ucvlatin/nsMacCroatianToUnicode.h | 18 +- .../uconv/ucvlatin/nsMacCyrillicToUnicode.cpp | 13 +- intl/uconv/ucvlatin/nsMacCyrillicToUnicode.h | 18 +- .../ucvlatin/nsMacDevanagariToUnicode.cpp | 12 +- .../uconv/ucvlatin/nsMacDevanagariToUnicode.h | 18 +- intl/uconv/ucvlatin/nsMacFarsiToUnicode.cpp | 12 +- intl/uconv/ucvlatin/nsMacFarsiToUnicode.h | 18 +- intl/uconv/ucvlatin/nsMacGreekToUnicode.cpp | 13 +- intl/uconv/ucvlatin/nsMacGreekToUnicode.h | 18 +- .../uconv/ucvlatin/nsMacGujaratiToUnicode.cpp | 12 +- intl/uconv/ucvlatin/nsMacGujaratiToUnicode.h | 18 +- .../uconv/ucvlatin/nsMacGurmukhiToUnicode.cpp | 12 +- intl/uconv/ucvlatin/nsMacGurmukhiToUnicode.h | 18 +- intl/uconv/ucvlatin/nsMacHebrewToUnicode.cpp | 12 +- intl/uconv/ucvlatin/nsMacHebrewToUnicode.h | 18 +- .../ucvlatin/nsMacIcelandicToUnicode.cpp | 13 +- intl/uconv/ucvlatin/nsMacIcelandicToUnicode.h | 18 +- .../uconv/ucvlatin/nsMacRomanianToUnicode.cpp | 13 +- intl/uconv/ucvlatin/nsMacRomanianToUnicode.h | 18 +- intl/uconv/ucvlatin/nsMacTurkishToUnicode.cpp | 13 +- intl/uconv/ucvlatin/nsMacTurkishToUnicode.h | 18 +- .../ucvlatin/nsMacUkrainianToUnicode.cpp | 13 +- intl/uconv/ucvlatin/nsMacUkrainianToUnicode.h | 18 +- intl/uconv/ucvlatin/nsT61ToUnicode.cpp | 13 +- intl/uconv/ucvlatin/nsT61ToUnicode.h | 18 +- intl/uconv/ucvlatin/nsTCVN5712ToUnicode.cpp | 13 +- intl/uconv/ucvlatin/nsTCVN5712ToUnicode.h | 18 +- intl/uconv/ucvlatin/nsUCS2BEToUnicode.cpp | 1 + intl/uconv/ucvlatin/nsUnicodeToARMSCII8.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToARMSCII8.h | 18 +- intl/uconv/ucvlatin/nsUnicodeToAscii.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToAscii.h | 18 +- intl/uconv/ucvlatin/nsUnicodeToCP1250.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToCP1250.h | 18 +- intl/uconv/ucvlatin/nsUnicodeToCP1251.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToCP1251.h | 18 +- intl/uconv/ucvlatin/nsUnicodeToCP1253.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToCP1253.h | 18 +- intl/uconv/ucvlatin/nsUnicodeToCP1254.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToCP1254.h | 18 +- intl/uconv/ucvlatin/nsUnicodeToCP1255.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToCP1255.h | 18 +- intl/uconv/ucvlatin/nsUnicodeToCP1256.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToCP1256.h | 18 +- intl/uconv/ucvlatin/nsUnicodeToCP1257.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToCP1257.h | 18 +- intl/uconv/ucvlatin/nsUnicodeToCP1258.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToCP1258.h | 18 +- intl/uconv/ucvlatin/nsUnicodeToCP866.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToCP866.h | 18 +- intl/uconv/ucvlatin/nsUnicodeToCP874.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToCP874.h | 18 +- intl/uconv/ucvlatin/nsUnicodeToGEOSTD8.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToGEOSTD8.h | 18 +- intl/uconv/ucvlatin/nsUnicodeToISO885910.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToISO885910.h | 18 +- intl/uconv/ucvlatin/nsUnicodeToISO885913.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToISO885913.h | 18 +- intl/uconv/ucvlatin/nsUnicodeToISO885914.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToISO885914.h | 18 +- intl/uconv/ucvlatin/nsUnicodeToISO885915.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToISO885915.h | 18 +- intl/uconv/ucvlatin/nsUnicodeToISO885916.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToISO885916.h | 18 +- intl/uconv/ucvlatin/nsUnicodeToISO88592.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToISO88592.h | 18 +- intl/uconv/ucvlatin/nsUnicodeToISO88593.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToISO88593.h | 18 +- intl/uconv/ucvlatin/nsUnicodeToISO88594.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToISO88594.h | 18 +- intl/uconv/ucvlatin/nsUnicodeToISO88595.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToISO88595.h | 18 +- intl/uconv/ucvlatin/nsUnicodeToISO88596.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToISO88596.h | 18 +- intl/uconv/ucvlatin/nsUnicodeToISO88596E.cpp | 10 +- intl/uconv/ucvlatin/nsUnicodeToISO88596E.h | 18 +- intl/uconv/ucvlatin/nsUnicodeToISO88596I.cpp | 10 +- intl/uconv/ucvlatin/nsUnicodeToISO88596I.h | 18 +- intl/uconv/ucvlatin/nsUnicodeToISO88597.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToISO88597.h | 18 +- intl/uconv/ucvlatin/nsUnicodeToISO88598.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToISO88598.h | 18 +- intl/uconv/ucvlatin/nsUnicodeToISO88598E.cpp | 10 +- intl/uconv/ucvlatin/nsUnicodeToISO88598E.h | 18 +- intl/uconv/ucvlatin/nsUnicodeToISO88598I.cpp | 10 +- intl/uconv/ucvlatin/nsUnicodeToISO88598I.h | 18 +- intl/uconv/ucvlatin/nsUnicodeToISO88599.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToISO88599.h | 18 +- intl/uconv/ucvlatin/nsUnicodeToISOIR111.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToISOIR111.h | 18 +- intl/uconv/ucvlatin/nsUnicodeToKOI8R.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToKOI8R.h | 18 +- intl/uconv/ucvlatin/nsUnicodeToKOI8U.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToKOI8U.h | 18 +- .../ucvlatin/nsUnicodeToLangBoxArabic8.cpp | 3 +- intl/uconv/ucvlatin/nsUnicodeToMUTF7.cpp | 1 + intl/uconv/ucvlatin/nsUnicodeToMacArabic.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToMacArabic.h | 18 +- intl/uconv/ucvlatin/nsUnicodeToMacCE.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToMacCE.h | 18 +- .../uconv/ucvlatin/nsUnicodeToMacCroatian.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToMacCroatian.h | 18 +- .../uconv/ucvlatin/nsUnicodeToMacCyrillic.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToMacCyrillic.h | 18 +- .../ucvlatin/nsUnicodeToMacDevanagari.cpp | 13 +- .../uconv/ucvlatin/nsUnicodeToMacDevanagari.h | 18 +- intl/uconv/ucvlatin/nsUnicodeToMacFarsi.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToMacFarsi.h | 18 +- intl/uconv/ucvlatin/nsUnicodeToMacGreek.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToMacGreek.h | 18 +- .../uconv/ucvlatin/nsUnicodeToMacGujarati.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToMacGujarati.h | 18 +- .../uconv/ucvlatin/nsUnicodeToMacGurmukhi.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToMacGurmukhi.h | 18 +- intl/uconv/ucvlatin/nsUnicodeToMacHebrew.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToMacHebrew.h | 18 +- .../ucvlatin/nsUnicodeToMacIcelandic.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToMacIcelandic.h | 18 +- .../uconv/ucvlatin/nsUnicodeToMacRomanian.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToMacRomanian.h | 18 +- intl/uconv/ucvlatin/nsUnicodeToMacTurkish.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToMacTurkish.h | 18 +- .../ucvlatin/nsUnicodeToMacUkrainian.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToMacUkrainian.h | 18 +- intl/uconv/ucvlatin/nsUnicodeToSymbol.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToSymbol.h | 18 +- intl/uconv/ucvlatin/nsUnicodeToT61.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToT61.h | 18 +- intl/uconv/ucvlatin/nsUnicodeToTCVN5712.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToTCVN5712.h | 18 +- .../uconv/ucvlatin/nsUnicodeToUserDefined.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToUserDefined.h | 17 +- intl/uconv/ucvlatin/nsUnicodeToVISCII.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToVISCII.h | 18 +- intl/uconv/ucvlatin/nsUnicodeToVPS.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToVPS.h | 18 +- .../uconv/ucvlatin/nsUnicodeToZapfDingbat.cpp | 13 +- intl/uconv/ucvlatin/nsUnicodeToZapfDingbat.h | 18 +- .../uconv/ucvlatin/nsUserDefinedToUnicode.cpp | 13 +- intl/uconv/ucvlatin/nsUserDefinedToUnicode.h | 18 +- intl/uconv/ucvlatin/nsVISCIIToUnicode.cpp | 13 +- intl/uconv/ucvlatin/nsVISCIIToUnicode.h | 18 +- intl/uconv/ucvlatin/nsVPSToUnicode.cpp | 13 +- intl/uconv/ucvlatin/nsVPSToUnicode.h | 18 +- intl/uconv/ucvmath/nsUCvMathSupport.cpp | 736 ------------------ intl/uconv/ucvmath/nsUCvMathSupport.h | 439 ----------- intl/uconv/ucvtw/nsBIG5HKSCSToUnicode.cpp | 16 +- intl/uconv/ucvtw/nsBIG5HKSCSToUnicode.h | 19 +- intl/uconv/ucvtw/nsBIG5ToUnicode.cpp | 17 +- intl/uconv/ucvtw/nsBIG5ToUnicode.h | 20 +- intl/uconv/ucvtw/nsUnicodeToBIG5.cpp | 15 +- intl/uconv/ucvtw/nsUnicodeToBIG5.h | 19 +- intl/uconv/ucvtw/nsUnicodeToBIG5HKSCS.cpp | 16 +- intl/uconv/ucvtw/nsUnicodeToBIG5HKSCS.h | 19 +- intl/uconv/ucvtw/nsUnicodeToHKSCS.cpp | 14 +- intl/uconv/ucvtw/nsUnicodeToHKSCS.h | 19 +- intl/uconv/ucvtw2/nsEUCTWToUnicode.cpp | 15 +- intl/uconv/ucvtw2/nsEUCTWToUnicode.h | 20 +- intl/uconv/ucvtw2/nsUnicodeToCNS11643p1.cpp | 12 +- intl/uconv/ucvtw2/nsUnicodeToCNS11643p1.h | 19 +- intl/uconv/ucvtw2/nsUnicodeToCNS11643p2.cpp | 16 +- intl/uconv/ucvtw2/nsUnicodeToCNS11643p2.h | 19 +- intl/uconv/ucvtw2/nsUnicodeToCNS11643p3.cpp | 16 +- intl/uconv/ucvtw2/nsUnicodeToCNS11643p3.h | 19 +- intl/uconv/ucvtw2/nsUnicodeToCNS11643p4.cpp | 16 +- intl/uconv/ucvtw2/nsUnicodeToCNS11643p4.h | 19 +- intl/uconv/ucvtw2/nsUnicodeToCNS11643p5.cpp | 15 +- intl/uconv/ucvtw2/nsUnicodeToCNS11643p5.h | 19 +- intl/uconv/ucvtw2/nsUnicodeToCNS11643p6.cpp | 15 +- intl/uconv/ucvtw2/nsUnicodeToCNS11643p6.h | 19 +- intl/uconv/ucvtw2/nsUnicodeToCNS11643p7.cpp | 15 +- intl/uconv/ucvtw2/nsUnicodeToCNS11643p7.h | 19 +- intl/uconv/ucvtw2/nsUnicodeToEUCTW.cpp | 14 +- intl/uconv/ucvtw2/nsUnicodeToEUCTW.h | 19 +- intl/uconv/util/nsUCConstructors.cpp | 60 +- intl/uconv/util/nsUCConstructors.h | 29 +- intl/uconv/util/nsUCRegUtils.cpp | 40 +- 316 files changed, 1827 insertions(+), 4525 deletions(-) delete mode 100644 intl/uconv/ucvmath/nsUCvMathSupport.cpp delete mode 100644 intl/uconv/ucvmath/nsUCvMathSupport.h diff --git a/intl/uconv/src/Makefile.in b/intl/uconv/src/Makefile.in index 024388492ca7..0a4c9d67ea05 100644 --- a/intl/uconv/src/Makefile.in +++ b/intl/uconv/src/Makefile.in @@ -51,6 +51,7 @@ CSRCS = \ $(NULL) CPPSRCS = \ + nsUConvModule.cpp \ nsCharsetConverterManager.cpp \ nsTextToSubURI.cpp \ nsUnicodeDecodeHelper.cpp \ @@ -58,7 +59,6 @@ CPPSRCS = \ nsCharsetAliasImp.cpp \ nsURLProperties.cpp \ nsMappingCache.cpp \ - nsUConvModule.cpp \ nsISO88591ToUnicode.cpp \ nsCP1252ToUnicode.cpp \ nsMacRomanToUnicode.cpp \ diff --git a/intl/uconv/src/nsCP1252ToUnicode.cpp b/intl/uconv/src/nsCP1252ToUnicode.cpp index 68c247c19a1c..04856059c9f8 100644 --- a/intl/uconv/src/nsCP1252ToUnicode.cpp +++ b/intl/uconv/src/nsCP1252ToUnicode.cpp @@ -36,7 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ -#include "nsUCSupport.h" +#include "nsUCConstructors.h" #include "nsCP1252ToUnicode.h" //---------------------------------------------------------------------- @@ -51,11 +51,11 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsCP1252ToUnicode [implementation] - -nsCP1252ToUnicode::nsCP1252ToUnicode() -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsCP1252ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/src/nsCP1252ToUnicode.h b/intl/uconv/src/nsCP1252ToUnicode.h index 5f09316a0b06..55cc6d055b3f 100644 --- a/intl/uconv/src/nsCP1252ToUnicode.h +++ b/intl/uconv/src/nsCP1252ToUnicode.h @@ -39,6 +39,8 @@ #ifndef nsCP1252ToUnicode_h___ #define nsCP1252ToUnicode_h___ +#include "nsISupports.h" + // Class ID for our CP1252ToUnicode charset converter // {7C657D15-EC5E-11d2-8AAC-00600811A836} #define NS_CP1252TOUNICODE_CID \ @@ -46,24 +48,14 @@ #define NS_CP1252TOUNICODE_CONTRACTID "@mozilla.org/intl/unicode/decoder;1?charset=windows-1252" -//---------------------------------------------------------------------- -// Class nsCP1252ToUnicode [declaration] - /** * A character set converter from CP1252 to Unicode. * * @created 20/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsCP1252ToUnicode : public nsOneByteDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsCP1252ToUnicode(); - -}; +NS_METHOD +nsCP1252ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsCP1252ToUnicode_h___ */ diff --git a/intl/uconv/src/nsISO88591ToUnicode.cpp b/intl/uconv/src/nsISO88591ToUnicode.cpp index 42711526ae72..e8c91ce85bd9 100644 --- a/intl/uconv/src/nsISO88591ToUnicode.cpp +++ b/intl/uconv/src/nsISO88591ToUnicode.cpp @@ -36,7 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ -#include "nsUCSupport.h" +#include "nsUCConstructors.h" #include "nsISO88591ToUnicode.h" //---------------------------------------------------------------------- @@ -51,12 +51,12 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsISO88591ToUnicode [implementation] - -nsISO88591ToUnicode::nsISO88591ToUnicode() -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsISO88591ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/src/nsISO88591ToUnicode.h b/intl/uconv/src/nsISO88591ToUnicode.h index dd4123834016..6a26f05499bb 100644 --- a/intl/uconv/src/nsISO88591ToUnicode.h +++ b/intl/uconv/src/nsISO88591ToUnicode.h @@ -39,6 +39,8 @@ #ifndef nsISO88591ToUnicode_h___ #define nsISO88591ToUnicode_h___ +#include "nsISupports.h" + // Class ID for our ISO88591ToUnicode charset converter // {A3254CB0-8E20-11d2-8A98-00600811A836} #define NS_ISO88591TOUNICODE_CID \ @@ -46,24 +48,14 @@ #define NS_ISO88591TOUNICODE_CONTRACTID "@mozilla.org/intl/unicode/decoder;1?charset=ISO-8859-1" -//---------------------------------------------------------------------- -// Class nsISO88591ToUnicode [declaration] - /** * A character set converter from ISO88591 to Unicode. * * @created 23/Nov/1998 * @author Catalin Rotaru [CATA] */ -class nsISO88591ToUnicode : public nsOneByteDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsISO88591ToUnicode(); - -}; +NS_METHOD +nsISO88591ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsISO88591ToUnicode_h___ */ diff --git a/intl/uconv/src/nsMacRomanToUnicode.cpp b/intl/uconv/src/nsMacRomanToUnicode.cpp index 0b0cc28def6e..7aa68c4050e6 100644 --- a/intl/uconv/src/nsMacRomanToUnicode.cpp +++ b/intl/uconv/src/nsMacRomanToUnicode.cpp @@ -36,7 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ -#include "nsUCSupport.h" +#include "nsUCConstructors.h" #include "nsMacRomanToUnicode.h" //---------------------------------------------------------------------- @@ -51,12 +51,12 @@ static const PRInt16 g_MacRomanShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsMacRomanToUnicode [implementation] - -nsMacRomanToUnicode::nsMacRomanToUnicode() -: nsTableDecoderSupport((uShiftTable*) &g_MacRomanShiftTable, - (uMappingTable*) &g_MacRomanMappingTable, 1) +NS_METHOD +nsMacRomanToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableDecoder((uShiftTable*) &g_MacRomanShiftTable, + (uMappingTable*) &g_MacRomanMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/src/nsMacRomanToUnicode.h b/intl/uconv/src/nsMacRomanToUnicode.h index 586883bff9df..b27ceeb71ff5 100644 --- a/intl/uconv/src/nsMacRomanToUnicode.h +++ b/intl/uconv/src/nsMacRomanToUnicode.h @@ -39,6 +39,8 @@ #ifndef nsMacRomanToUnicode_h___ #define nsMacRomanToUnicode_h___ +#include "nsISupports.h" + // Class ID for our MacRomanToUnicode charset converter // {7B8556A1-EC79-11d2-8AAC-00600811A836} #define NS_MACROMANTOUNICODE_CID \ @@ -49,26 +51,14 @@ //#define NS_ERROR_UCONV_NOMACROMANTOUNICODE // NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_UCONV, 0x31) -//---------------------------------------------------------------------- -// Class nsMacRomanToUnicode [declaration] - /** * A character set converter from MacRoman to Unicode. * * @created 05/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsMacRomanToUnicode : public nsTableDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsMacRomanToUnicode(); - -protected: - -}; +NS_METHOD +nsMacRomanToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsMacRomanToUnicode_h___ */ diff --git a/intl/uconv/src/nsUConvModule.cpp b/intl/uconv/src/nsUConvModule.cpp index 455a1041b221..7306105c893c 100644 --- a/intl/uconv/src/nsUConvModule.cpp +++ b/intl/uconv/src/nsUConvModule.cpp @@ -426,114 +426,18 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsCharsetAlias2) NS_GENERIC_FACTORY_CONSTRUCTOR(nsTextToSubURI) NS_GENERIC_FACTORY_CONSTRUCTOR(nsScriptableUnicodeConverter) NS_GENERIC_FACTORY_CONSTRUCTOR(nsConverterInputStream) -NS_GENERIC_FACTORY_CONSTRUCTOR(nsISO88591ToUnicode) -NS_GENERIC_FACTORY_CONSTRUCTOR(nsCP1252ToUnicode) -NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacRomanToUnicode) -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUTF8ToUnicode) -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToISO88591) -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToCP1252) -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToMacRoman) NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToUTF8) +NS_GENERIC_FACTORY_CONSTRUCTOR(nsUTF8ToUnicode) // ucvlatin -NS_GENERIC_FACTORY_CONSTRUCTOR(nsAsciiToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUEscapeToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsISO88592ToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsISO88593ToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsISO88594ToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsISO88595ToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsISO88596ToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsISO88596EToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsISO88596IToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsISO88597ToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsISO88598ToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsISO88598EToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsISO88598IToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsISO88599ToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsISO885910ToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsISO885913ToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsISO885914ToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsISO885915ToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsISO885916ToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsISOIR111ToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsCP1250ToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsCP1251ToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsCP1253ToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsCP1254ToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsCP1255ToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsCP1256ToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsCP1257ToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsCP1258ToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsCP874ToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsCP866ToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsKOI8RToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsKOI8UToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacCEToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacGreekToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacTurkishToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacCroatianToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacRomanianToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacCyrillicToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacUkrainianToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacIcelandicToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsGEOSTD8ToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsARMSCII8ToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsTCVN5712ToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsVISCIIToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsVPSToUnicode); NS_GENERIC_FACTORY_CONSTRUCTOR(nsUTF7ToUnicode); NS_GENERIC_FACTORY_CONSTRUCTOR(nsMUTF7ToUnicode); NS_GENERIC_FACTORY_CONSTRUCTOR(nsUTF16BEToUnicode); NS_GENERIC_FACTORY_CONSTRUCTOR(nsUTF16LEToUnicode); NS_GENERIC_FACTORY_CONSTRUCTOR(nsUCS4BEToUnicode); NS_GENERIC_FACTORY_CONSTRUCTOR(nsUCS4LEToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsT61ToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUserDefinedToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToAscii); NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToUEscape); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToISO88592); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToISO88593); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToISO88594); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToISO88595); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToISO88596); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToISO88596E); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToISO88596I); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToISO88597); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToISO88598); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToISO88598E); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToISO88598I); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToISO88599); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToISO885910); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToISO885913); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToISO885914); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToISO885915); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToISO885916); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToISOIR111); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToCP1250); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToCP1251); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToCP1253); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToCP1254); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToCP1255); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToCP1256); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToCP1257); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToCP1258); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToCP874); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToCP866); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToKOI8R); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToKOI8U); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToMacCE); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToMacGreek); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToMacTurkish); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToMacCroatian); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToMacRomanian); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToMacCyrillic); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToMacUkrainian); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToMacIcelandic); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToGEOSTD8); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToARMSCII8); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToTCVN5712); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToVISCII); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToVPS); +NS_GENERIC_FACTORY_CONSTRUCTOR(nsUEscapeToUnicode); NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToUTF7); NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToMUTF7); NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToUTF16BE); @@ -541,79 +445,22 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToUTF16LE); NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToUTF16); NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToUCS4BE); NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToUCS4LE); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToT61); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToUserDefined); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToSymbol); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToZapfDingbat); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacArabicToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacDevanagariToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacFarsiToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacGurmukhiToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacGujaratiToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacHebrewToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToMacArabic); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToMacDevanagari); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToMacFarsi); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToMacGurmukhi); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToMacGujarati); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToMacHebrew); // ucvibm -NS_GENERIC_FACTORY_CONSTRUCTOR(nsCP850ToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsCP852ToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsCP855ToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsCP857ToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsCP862ToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsCP864ToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsCP864iToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToCP850); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToCP852); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToCP855); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToCP857); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToCP862); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToCP864); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToCP864i); // ucvja NS_GENERIC_FACTORY_CONSTRUCTOR(nsShiftJISToUnicode); NS_GENERIC_FACTORY_CONSTRUCTOR(nsEUCJPToUnicodeV2); NS_GENERIC_FACTORY_CONSTRUCTOR(nsISO2022JPToUnicodeV2); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToSJIS); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToEUCJP); NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToISO2022JP); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToJISx0201); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToJISx0208); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToJISx0212); // ucvtw2 -NS_GENERIC_FACTORY_CONSTRUCTOR(nsEUCTWToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToEUCTW); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToCNS11643p1); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToCNS11643p2); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToCNS11643p3); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToCNS11643p4); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToCNS11643p5); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToCNS11643p6); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToCNS11643p7); // ucvtw -NS_GENERIC_FACTORY_CONSTRUCTOR(nsBIG5ToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToBIG5); NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToBIG5NoAscii); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsBIG5HKSCSToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToBIG5HKSCS); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToHKSCS); // ucvko -NS_GENERIC_FACTORY_CONSTRUCTOR(nsEUCKRToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToEUCKR); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToKSC5601); NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToX11Johab); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsJohabToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToJohab); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToJohabNoAscii); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsCP949ToUnicode); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToCP949); NS_GENERIC_FACTORY_CONSTRUCTOR(nsISO2022KRToUnicode); // ucvcn diff --git a/intl/uconv/src/nsUnicodeToCP1252.cpp b/intl/uconv/src/nsUnicodeToCP1252.cpp index 8762ebd51326..7ab60fd3f797 100644 --- a/intl/uconv/src/nsUnicodeToCP1252.cpp +++ b/intl/uconv/src/nsUnicodeToCP1252.cpp @@ -36,7 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ -#include "nsUCSupport.h" +#include "nsUCConstructors.h" #include "nsUnicodeToCP1252.h" //---------------------------------------------------------------------- @@ -51,12 +51,12 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToCP1252 [implementation] - -nsUnicodeToCP1252::nsUnicodeToCP1252() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToCP1252Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/src/nsUnicodeToCP1252.h b/intl/uconv/src/nsUnicodeToCP1252.h index 5e004e1412d5..6284a0aefa7c 100644 --- a/intl/uconv/src/nsUnicodeToCP1252.h +++ b/intl/uconv/src/nsUnicodeToCP1252.h @@ -39,6 +39,7 @@ #ifndef nsUnicodeToCP1252_h___ #define nsUnicodeToCP1252_h___ +#include "nsISupports.h" // Class ID for our UnicodeToCP1252 charset converter // {7B8556AC-EC79-11d2-8AAC-00600811A836} #define NS_UNICODETOCP1252_CID \ @@ -49,24 +50,14 @@ //#define NS_ERROR_UCONV_NOUNICODETOCP1252 // NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_UCONV, 0x31) -//---------------------------------------------------------------------- -// Class nsUnicodeToCP1252 [declaration] - /** * A character set converter from Unicode to CP1252. * * @created 20/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToCP1252 : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToCP1252(); - -}; +NS_METHOD +nsUnicodeToCP1252Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToCP1252_h___ */ diff --git a/intl/uconv/src/nsUnicodeToISO88591.cpp b/intl/uconv/src/nsUnicodeToISO88591.cpp index f39cdfc2bfae..fc87d6d8cefa 100644 --- a/intl/uconv/src/nsUnicodeToISO88591.cpp +++ b/intl/uconv/src/nsUnicodeToISO88591.cpp @@ -36,7 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ -#include "nsUCSupport.h" +#include "nsUCConstructors.h" #include "nsUnicodeToISO88591.h" //---------------------------------------------------------------------- @@ -51,12 +51,12 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToISO88591 [implementation] - -nsUnicodeToISO88591::nsUnicodeToISO88591() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToISO88591Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/src/nsUnicodeToISO88591.h b/intl/uconv/src/nsUnicodeToISO88591.h index fb01a1d26b82..fcdc999f79e5 100644 --- a/intl/uconv/src/nsUnicodeToISO88591.h +++ b/intl/uconv/src/nsUnicodeToISO88591.h @@ -39,6 +39,8 @@ #ifndef nsUnicodeToISO88591_h___ #define nsUnicodeToISO88591_h___ +#include "nsISupports.h" + // {920307B0-C6E8-11d2-8AA8-00600811A836} #define NS_UNICODETOISO88591_CID \ { 0x920307b0, 0xc6e8, 0x11d2, {0x8a, 0xa8, 0x0, 0x60, 0x8, 0x11, 0xa8, 0x36}} @@ -49,23 +51,14 @@ // NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_UCONV, 0x31) -//---------------------------------------------------------------------- -// Class nsUnicodeToISO88591 [declaration] - /** * A character set converter from Unicode to ISO88591. * * @created 17/Feb/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToISO88591 : public nsTableEncoderSupport -{ -public: +NS_METHOD +nsUnicodeToISO88591Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); - /** - * Class constructor. - */ - nsUnicodeToISO88591(); - -}; #endif /* nsUnicodeToISO88591_h___ */ diff --git a/intl/uconv/src/nsUnicodeToMacRoman.cpp b/intl/uconv/src/nsUnicodeToMacRoman.cpp index 618339a7ae4e..b0d2e257125e 100644 --- a/intl/uconv/src/nsUnicodeToMacRoman.cpp +++ b/intl/uconv/src/nsUnicodeToMacRoman.cpp @@ -36,7 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ -#include "nsUCSupport.h" +#include "nsUCConstructors.h" #include "nsUnicodeToMacRoman.h" //---------------------------------------------------------------------- @@ -51,12 +51,12 @@ static const PRInt16 g_MacRomanShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToMacRoman [implementation] - -nsUnicodeToMacRoman::nsUnicodeToMacRoman() -: nsTableEncoderSupport((uShiftTable*) &g_MacRomanShiftTable, - (uMappingTable*) &g_MacRomanMappingTable, 1) +NS_METHOD +nsUnicodeToMacRomanConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_MacRomanShiftTable, + (uMappingTable*) &g_MacRomanMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/src/nsUnicodeToMacRoman.h b/intl/uconv/src/nsUnicodeToMacRoman.h index 6feeb3796a46..a28832dfb1b3 100644 --- a/intl/uconv/src/nsUnicodeToMacRoman.h +++ b/intl/uconv/src/nsUnicodeToMacRoman.h @@ -39,6 +39,8 @@ #ifndef nsUnicodeToMacRoman_h___ #define nsUnicodeToMacRoman_h___ +#include "nsISupports.h" + // Class ID for our UnicodeToMacRoman charset converter // {7B8556AF-EC79-11d2-8AAC-00600811A836} #define NS_UNICODETOMACROMAN_CID \ @@ -46,24 +48,14 @@ #define NS_UNICODETOMACROMAN_CONTRACTID "@mozilla.org/intl/unicode/encoder;1?charset=x-mac-roman" -//---------------------------------------------------------------------- -// Class nsUnicodeToMacRoman [declaration] - /** * A character set converter from Unicode to MacRoman. * * @created 05/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToMacRoman : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToMacRoman(); - -}; +NS_METHOD +nsUnicodeToMacRomanConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToMacRoman_h___ */ diff --git a/intl/uconv/ucvibm/nsCP850ToUnicode.cpp b/intl/uconv/ucvibm/nsCP850ToUnicode.cpp index 1ae76819576e..b4a4f0e5a534 100644 --- a/intl/uconv/ucvibm/nsCP850ToUnicode.cpp +++ b/intl/uconv/ucvibm/nsCP850ToUnicode.cpp @@ -33,6 +33,7 @@ * */ +#include "nsUCConstructors.h" #include "nsCP850ToUnicode.h" //---------------------------------------------------------------------- @@ -50,8 +51,11 @@ static const PRInt16 g_utShiftTable[] = { //---------------------------------------------------------------------- // Class nsCP850ToUnicode [implementation] -nsCP850ToUnicode::nsCP850ToUnicode() -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsCP850ToUnicodeConstructor(nsISupports* aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvibm/nsCP850ToUnicode.h b/intl/uconv/ucvibm/nsCP850ToUnicode.h index 8344364ce200..39903e04815f 100644 --- a/intl/uconv/ucvibm/nsCP850ToUnicode.h +++ b/intl/uconv/ucvibm/nsCP850ToUnicode.h @@ -36,22 +36,13 @@ #ifndef nsCP850ToUnicode_h___ #define nsCP850ToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsCP850ToUnicode [declaration] - +#include "nsISupports.h" /** * A character set converter from CP850 to Unicode. */ -class nsCP850ToUnicode : public nsOneByteDecoderSupport -{ -public: +NS_METHOD +nsCP850ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); - /** - * Class constructor. - */ - nsCP850ToUnicode(); -}; #endif /* nsCP850ToUnicode_h___ */ diff --git a/intl/uconv/ucvibm/nsCP852ToUnicode.cpp b/intl/uconv/ucvibm/nsCP852ToUnicode.cpp index 81413ebfb12e..2588683d9a1d 100644 --- a/intl/uconv/ucvibm/nsCP852ToUnicode.cpp +++ b/intl/uconv/ucvibm/nsCP852ToUnicode.cpp @@ -33,6 +33,7 @@ * */ +#include "nsUCConstructors.h" #include "nsCP852ToUnicode.h" //---------------------------------------------------------------------- @@ -47,12 +48,12 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsCP852ToUnicode [implementation] - -nsCP852ToUnicode::nsCP852ToUnicode() -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsCP852ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvibm/nsCP852ToUnicode.h b/intl/uconv/ucvibm/nsCP852ToUnicode.h index 7f02088a2117..cd973e88d54c 100644 --- a/intl/uconv/ucvibm/nsCP852ToUnicode.h +++ b/intl/uconv/ucvibm/nsCP852ToUnicode.h @@ -36,22 +36,14 @@ #ifndef nsCP852ToUnicode_h___ #define nsCP852ToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsCP852ToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from CP852 to Unicode. */ -class nsCP852ToUnicode : public nsOneByteDecoderSupport -{ -public: +NS_METHOD +nsCP852ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); - /** - * Class constructor. - */ - nsCP852ToUnicode(); -}; #endif /* nsCP852ToUnicode_h___ */ diff --git a/intl/uconv/ucvibm/nsCP855ToUnicode.cpp b/intl/uconv/ucvibm/nsCP855ToUnicode.cpp index 2e4d7fd3bd2b..7654f0cce732 100644 --- a/intl/uconv/ucvibm/nsCP855ToUnicode.cpp +++ b/intl/uconv/ucvibm/nsCP855ToUnicode.cpp @@ -33,6 +33,7 @@ * */ +#include "nsUCConstructors.h" #include "nsCP855ToUnicode.h" //---------------------------------------------------------------------- @@ -47,12 +48,13 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsCP855ToUnicode [implementation] -nsCP855ToUnicode::nsCP855ToUnicode() -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsCP855ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvibm/nsCP855ToUnicode.h b/intl/uconv/ucvibm/nsCP855ToUnicode.h index a2743199efa8..8e75d3f5672d 100644 --- a/intl/uconv/ucvibm/nsCP855ToUnicode.h +++ b/intl/uconv/ucvibm/nsCP855ToUnicode.h @@ -36,22 +36,14 @@ #ifndef nsCP855ToUnicode_h___ #define nsCP855ToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsCP855ToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from CP855 to Unicode. */ -class nsCP855ToUnicode : public nsOneByteDecoderSupport -{ -public: +NS_METHOD +nsCP855ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); - /** - * Class constructor. - */ - nsCP855ToUnicode(); -}; #endif /* nsCP855ToUnicode_h___ */ diff --git a/intl/uconv/ucvibm/nsCP857ToUnicode.cpp b/intl/uconv/ucvibm/nsCP857ToUnicode.cpp index efd2c10e6863..fa3859a9f287 100644 --- a/intl/uconv/ucvibm/nsCP857ToUnicode.cpp +++ b/intl/uconv/ucvibm/nsCP857ToUnicode.cpp @@ -33,6 +33,7 @@ * */ +#include "nsUCConstructors.h" #include "nsCP857ToUnicode.h" //---------------------------------------------------------------------- @@ -47,12 +48,12 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsCP857ToUnicode [implementation] - -nsCP857ToUnicode::nsCP857ToUnicode() -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsCP857ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvibm/nsCP857ToUnicode.h b/intl/uconv/ucvibm/nsCP857ToUnicode.h index 1ab91151a8cc..1c6546a0c911 100644 --- a/intl/uconv/ucvibm/nsCP857ToUnicode.h +++ b/intl/uconv/ucvibm/nsCP857ToUnicode.h @@ -36,22 +36,15 @@ #ifndef nsCP857ToUnicode_h___ #define nsCP857ToUnicode_h___ -#include "nsUCSupport.h" +#include "nsISupports.h" -//---------------------------------------------------------------------- -// Class nsCP857ToUnicode [declaration] /** * A character set converter from CP857 to Unicode. */ -class nsCP857ToUnicode : public nsOneByteDecoderSupport -{ -public: +NS_METHOD +nsCP857ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); - /** - * Class constructor. - */ - nsCP857ToUnicode(); -}; #endif /* nsCP857ToUnicode_h___ */ diff --git a/intl/uconv/ucvibm/nsCP862ToUnicode.cpp b/intl/uconv/ucvibm/nsCP862ToUnicode.cpp index f140e9ef1df8..4c648b0d73cd 100644 --- a/intl/uconv/ucvibm/nsCP862ToUnicode.cpp +++ b/intl/uconv/ucvibm/nsCP862ToUnicode.cpp @@ -33,6 +33,7 @@ * */ +#include "nsUCConstructors.h" #include "nsCP862ToUnicode.h" //---------------------------------------------------------------------- @@ -47,12 +48,12 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsCP862ToUnicode [implementation] - -nsCP862ToUnicode::nsCP862ToUnicode() -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsCP862ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvibm/nsCP862ToUnicode.h b/intl/uconv/ucvibm/nsCP862ToUnicode.h index de33408088fd..28898cc27234 100644 --- a/intl/uconv/ucvibm/nsCP862ToUnicode.h +++ b/intl/uconv/ucvibm/nsCP862ToUnicode.h @@ -36,22 +36,15 @@ #ifndef nsCP862ToUnicode_h___ #define nsCP862ToUnicode_h___ -#include "nsUCSupport.h" +#include "nsISupports.h" -//---------------------------------------------------------------------- -// Class nsCP862ToUnicode [declaration] /** * A character set converter from CP862 to Unicode. */ -class nsCP862ToUnicode : public nsOneByteDecoderSupport -{ -public: +NS_METHOD +nsCP862ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); - /** - * Class constructor. - */ - nsCP862ToUnicode(); -}; #endif /* nsCP862ToUnicode_h___ */ diff --git a/intl/uconv/ucvibm/nsCP864ToUnicode.cpp b/intl/uconv/ucvibm/nsCP864ToUnicode.cpp index 5b3a4cba7c19..c68ba69549a6 100644 --- a/intl/uconv/ucvibm/nsCP864ToUnicode.cpp +++ b/intl/uconv/ucvibm/nsCP864ToUnicode.cpp @@ -33,6 +33,7 @@ * */ +#include "nsUCConstructors.h" #include "nsCP864ToUnicode.h" //---------------------------------------------------------------------- @@ -47,12 +48,12 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsCP864ToUnicode [implementation] - -nsCP864ToUnicode::nsCP864ToUnicode() -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsCP864ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvibm/nsCP864ToUnicode.h b/intl/uconv/ucvibm/nsCP864ToUnicode.h index 78cf53de93c2..a1e3b789109e 100644 --- a/intl/uconv/ucvibm/nsCP864ToUnicode.h +++ b/intl/uconv/ucvibm/nsCP864ToUnicode.h @@ -36,22 +36,15 @@ #ifndef nsCP864ToUnicode_h___ #define nsCP864ToUnicode_h___ -#include "nsUCSupport.h" +#include "nsISupports.h" -//---------------------------------------------------------------------- -// Class nsCP864ToUnicode [declaration] /** * A character set converter from CP864 to Unicode. */ -class nsCP864ToUnicode : public nsOneByteDecoderSupport -{ -public: +NS_METHOD +nsCP864ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); - /** - * Class constructor. - */ - nsCP864ToUnicode(); -}; #endif /* nsCP864ToUnicode_h___ */ diff --git a/intl/uconv/ucvibm/nsCP864iToUnicode.cpp b/intl/uconv/ucvibm/nsCP864iToUnicode.cpp index 23b51c5e96db..660ae6a351f3 100644 --- a/intl/uconv/ucvibm/nsCP864iToUnicode.cpp +++ b/intl/uconv/ucvibm/nsCP864iToUnicode.cpp @@ -1,83 +1,44 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code. - * - * The Initial Developer of the Original Code is Netscape Communications - * Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - * IBM Corporation - * - * This Original Code has been modified by IBM Corporation. - * Modifications made by IBM described herein are - * Copyright (c) International Business Machines - * Corporation, 1999 - * - * Modifications to Mozilla code or documentation - * identified per MPL Section 3.3 - * - * Date Modified by Description of modification - * 12/09/1999 IBM Corp. Support for IBM codepage 864i - * - */ - - +#include "nsUCConstructors.h" #include "nsCP864iToUnicode.h" - - //---------------------------------------------------------------------- - // Global functions and data [declaration] - - static const PRUint16 g_utMappingTable[] = { #include "864i.ut" }; @@ -87,20 +48,13 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- - -// Class nsCP864iToUnicode [implementation] - - - -nsCP864iToUnicode::nsCP864iToUnicode() - -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - - (uMappingTable*) &g_utMappingTable) - +NS_METHOD +nsCP864iToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { - + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvibm/nsCP864iToUnicode.h b/intl/uconv/ucvibm/nsCP864iToUnicode.h index ebd08815b359..0f509e4f82dc 100644 --- a/intl/uconv/ucvibm/nsCP864iToUnicode.h +++ b/intl/uconv/ucvibm/nsCP864iToUnicode.h @@ -1,116 +1,50 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code. - * - * The Initial Developer of the Original Code is Netscape Communications - * Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - * IBM Corporation - * - * This Original Code has been modified by IBM Corporation. - * Modifications made by IBM described herein are - * Copyright (c) International Business Machines - * Corporation, 1999 - * - * Modifications to Mozilla code or documentation - * identified per MPL Section 3.3 - * - * Date Modified by Description of modification - * 12/09/1999 IBM Corp. Support for IBM codepage 864i - * - */ - - #ifndef nsCP864iToUnicode_h___ - #define nsCP864iToUnicode_h___ - -#include "nsUCSupport.h" - - - -//---------------------------------------------------------------------- - -// Class nsCP864iToUnicode [declaration] - - +#include "nsISupports.h" /** - * A character set converter from CP864i to Unicode. - */ - -class nsCP864iToUnicode : public nsOneByteDecoderSupport - -{ - -public: - - - - /** - - * Class constructor. - - */ - - nsCP864iToUnicode(); - - - -}; - - +NS_METHOD +nsCP864iToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsCP864iToUnicode_h___ */ diff --git a/intl/uconv/ucvibm/nsUnicodeToCP850.cpp b/intl/uconv/ucvibm/nsUnicodeToCP850.cpp index 97f22618c7a4..27448c2322bd 100644 --- a/intl/uconv/ucvibm/nsUnicodeToCP850.cpp +++ b/intl/uconv/ucvibm/nsUnicodeToCP850.cpp @@ -33,6 +33,7 @@ * */ +#include "nsUCConstructors.h" #include "nsUnicodeToCP850.h" //---------------------------------------------------------------------- @@ -47,12 +48,12 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToCP850 [implementation] - -nsUnicodeToCP850::nsUnicodeToCP850() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToCP850Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvibm/nsUnicodeToCP850.h b/intl/uconv/ucvibm/nsUnicodeToCP850.h index f24dc57b9590..92b64f47947c 100644 --- a/intl/uconv/ucvibm/nsUnicodeToCP850.h +++ b/intl/uconv/ucvibm/nsUnicodeToCP850.h @@ -36,22 +36,15 @@ #ifndef nsUnicodeToCP850_h___ #define nsUnicodeToCP850_h___ -#include "nsUCSupport.h" +#include "nsISupports.h" -//---------------------------------------------------------------------- -// Class nsUnicodeToCP850 [declaration] /** * A character set converter from Unicode to CP850. */ -class nsUnicodeToCP850 : public nsTableEncoderSupport -{ -public: +NS_METHOD +nsUnicodeToCP850Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); - /** - * Class constructor. - */ - nsUnicodeToCP850(); -}; #endif /* nsUnicodeToCP850_h___ */ diff --git a/intl/uconv/ucvibm/nsUnicodeToCP852.cpp b/intl/uconv/ucvibm/nsUnicodeToCP852.cpp index 715d4e6524c6..bfa940626042 100644 --- a/intl/uconv/ucvibm/nsUnicodeToCP852.cpp +++ b/intl/uconv/ucvibm/nsUnicodeToCP852.cpp @@ -33,6 +33,7 @@ * */ +#include "nsUCConstructors.h" #include "nsUnicodeToCP852.h" //---------------------------------------------------------------------- @@ -47,12 +48,12 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToCP852 [implementation] - -nsUnicodeToCP852::nsUnicodeToCP852() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToCP852Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvibm/nsUnicodeToCP852.h b/intl/uconv/ucvibm/nsUnicodeToCP852.h index c54ecbed992a..c4b6d2cd76f8 100644 --- a/intl/uconv/ucvibm/nsUnicodeToCP852.h +++ b/intl/uconv/ucvibm/nsUnicodeToCP852.h @@ -36,23 +36,13 @@ #ifndef nsUnicodeToCP852_h___ #define nsUnicodeToCP852_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToCP852 [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to CP852. */ -class nsUnicodeToCP852 : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToCP852(); - -}; +NS_METHOD +nsUnicodeToCP852Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToCP852_h___ */ diff --git a/intl/uconv/ucvibm/nsUnicodeToCP855.cpp b/intl/uconv/ucvibm/nsUnicodeToCP855.cpp index ef8a36eff5bd..02be30f0b794 100644 --- a/intl/uconv/ucvibm/nsUnicodeToCP855.cpp +++ b/intl/uconv/ucvibm/nsUnicodeToCP855.cpp @@ -33,6 +33,7 @@ * */ +#include "nsUCConstructors.h" #include "nsUnicodeToCP855.h" //---------------------------------------------------------------------- @@ -47,12 +48,12 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToCP855 [implementation] - -nsUnicodeToCP855::nsUnicodeToCP855() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToCP855Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvibm/nsUnicodeToCP855.h b/intl/uconv/ucvibm/nsUnicodeToCP855.h index f640369248b5..babf7607d100 100644 --- a/intl/uconv/ucvibm/nsUnicodeToCP855.h +++ b/intl/uconv/ucvibm/nsUnicodeToCP855.h @@ -36,23 +36,14 @@ #ifndef nsUnicodeToCP855_h___ #define nsUnicodeToCP855_h___ -#include "nsUCSupport.h" +#include "nsISupports.h" -//---------------------------------------------------------------------- -// Class nsUnicodeToCP855 [declaration] /** * A character set converter from Unicode to CP855. */ -class nsUnicodeToCP855 : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToCP855(); - -}; +NS_METHOD +nsUnicodeToCP855Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToCP855_h___ */ diff --git a/intl/uconv/ucvibm/nsUnicodeToCP857.cpp b/intl/uconv/ucvibm/nsUnicodeToCP857.cpp index 5227650d8e8c..eb2bcc708b87 100644 --- a/intl/uconv/ucvibm/nsUnicodeToCP857.cpp +++ b/intl/uconv/ucvibm/nsUnicodeToCP857.cpp @@ -33,6 +33,7 @@ * */ +#include "nsUCConstructors.h" #include "nsUnicodeToCP857.h" //---------------------------------------------------------------------- @@ -47,12 +48,12 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToCP857 [implementation] - -nsUnicodeToCP857::nsUnicodeToCP857() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToCP857Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvibm/nsUnicodeToCP857.h b/intl/uconv/ucvibm/nsUnicodeToCP857.h index 2a711489818b..246a7fa129f0 100644 --- a/intl/uconv/ucvibm/nsUnicodeToCP857.h +++ b/intl/uconv/ucvibm/nsUnicodeToCP857.h @@ -36,23 +36,13 @@ #ifndef nsUnicodeToCP857_h___ #define nsUnicodeToCP857_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToCP857 [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to CP857. */ -class nsUnicodeToCP857 : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToCP857(); - -}; +NS_METHOD +nsUnicodeToCP857Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToCP857_h___ */ diff --git a/intl/uconv/ucvibm/nsUnicodeToCP862.cpp b/intl/uconv/ucvibm/nsUnicodeToCP862.cpp index c8f328b251c3..85e1af237349 100644 --- a/intl/uconv/ucvibm/nsUnicodeToCP862.cpp +++ b/intl/uconv/ucvibm/nsUnicodeToCP862.cpp @@ -33,6 +33,7 @@ * */ +#include "nsUCConstructors.h" #include "nsUnicodeToCP862.h" //---------------------------------------------------------------------- @@ -47,12 +48,12 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToCP862 [implementation] - -nsUnicodeToCP862::nsUnicodeToCP862() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToCP862Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvibm/nsUnicodeToCP862.h b/intl/uconv/ucvibm/nsUnicodeToCP862.h index 140c0bec9e79..1903744f32d1 100644 --- a/intl/uconv/ucvibm/nsUnicodeToCP862.h +++ b/intl/uconv/ucvibm/nsUnicodeToCP862.h @@ -36,23 +36,13 @@ #ifndef nsUnicodeToCP862_h___ #define nsUnicodeToCP862_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToCP862 [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to CP862. */ -class nsUnicodeToCP862 : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToCP862(); - -}; +NS_METHOD +nsUnicodeToCP862Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToCP862_h___ */ diff --git a/intl/uconv/ucvibm/nsUnicodeToCP864.cpp b/intl/uconv/ucvibm/nsUnicodeToCP864.cpp index 4b55672273ec..ecc83d38b91b 100644 --- a/intl/uconv/ucvibm/nsUnicodeToCP864.cpp +++ b/intl/uconv/ucvibm/nsUnicodeToCP864.cpp @@ -33,6 +33,7 @@ * */ +#include "nsUCConstructors.h" #include "nsUnicodeToCP864.h" //---------------------------------------------------------------------- @@ -47,12 +48,12 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToCP864 [implementation] - -nsUnicodeToCP864::nsUnicodeToCP864() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToCP864Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvibm/nsUnicodeToCP864.h b/intl/uconv/ucvibm/nsUnicodeToCP864.h index f441b5a0c9b4..ebc0208b2567 100644 --- a/intl/uconv/ucvibm/nsUnicodeToCP864.h +++ b/intl/uconv/ucvibm/nsUnicodeToCP864.h @@ -36,23 +36,13 @@ #ifndef nsUnicodeToCP864_h___ #define nsUnicodeToCP864_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToCP864 [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to CP864. */ -class nsUnicodeToCP864 : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToCP864(); - -}; +NS_METHOD +nsUnicodeToCP864Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToCP864_h___ */ diff --git a/intl/uconv/ucvibm/nsUnicodeToCP864i.cpp b/intl/uconv/ucvibm/nsUnicodeToCP864i.cpp index 30bacea50eec..7c234f6b864b 100644 --- a/intl/uconv/ucvibm/nsUnicodeToCP864i.cpp +++ b/intl/uconv/ucvibm/nsUnicodeToCP864i.cpp @@ -33,6 +33,7 @@ * */ +#include "nsUCConstructors.h" #include "nsUnicodeToCP864i.h" //---------------------------------------------------------------------- @@ -46,13 +47,13 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToCP864i [implementation] - -nsUnicodeToCP864i::nsUnicodeToCP864i() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToCP864iConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvibm/nsUnicodeToCP864i.h b/intl/uconv/ucvibm/nsUnicodeToCP864i.h index 33f63691e39e..d5223104a84b 100644 --- a/intl/uconv/ucvibm/nsUnicodeToCP864i.h +++ b/intl/uconv/ucvibm/nsUnicodeToCP864i.h @@ -36,23 +36,13 @@ #ifndef nsUnicodeToCP864i_h___ #define nsUnicodeToCP864i_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToCP864i [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to CP864i. */ -class nsUnicodeToCP864i : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToCP864i(); - -}; +NS_METHOD +nsUnicodeToCP864iConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToCP864i_h___ */ diff --git a/intl/uconv/ucvja/nsUnicodeToEUCJP.cpp b/intl/uconv/ucvja/nsUnicodeToEUCJP.cpp index c66eda58ab28..988ec237c3b7 100644 --- a/intl/uconv/ucvja/nsUnicodeToEUCJP.cpp +++ b/intl/uconv/ucvja/nsUnicodeToEUCJP.cpp @@ -38,6 +38,7 @@ #include "nsUnicodeToEUCJP.h" #include "nsUCVJADll.h" +#include "nsUCConstructors.h" //---------------------------------------------------------------------- // Global functions and data [declaration] @@ -74,14 +75,14 @@ static const PRUint16 *gMappingTables[SIZE_OF_TABLES] = { g_uf0212Mapping }; -//---------------------------------------------------------------------- -// Class nsUnicodeToEUCJP [implementation] - -nsUnicodeToEUCJP::nsUnicodeToEUCJP() -: nsMultiTableEncoderSupport(SIZE_OF_TABLES, - (uShiftTable**) gShiftTables, - (uMappingTable**) gMappingTables, - 3 /* max length = src * 3 */) +NS_METHOD +nsUnicodeToEUCJPConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateMultiTableEncoder(SIZE_OF_TABLES, + (uShiftTable**) gShiftTables, + (uMappingTable**) gMappingTables, + 3 /* max length = src * 3 */, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvja/nsUnicodeToEUCJP.h b/intl/uconv/ucvja/nsUnicodeToEUCJP.h index f940d5aa69b7..87b93e80a6b6 100644 --- a/intl/uconv/ucvja/nsUnicodeToEUCJP.h +++ b/intl/uconv/ucvja/nsUnicodeToEUCJP.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToEUCJP_h___ #define nsUnicodeToEUCJP_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToEUCJP [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to EUCJP. @@ -50,17 +47,8 @@ * @created 17/Feb/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToEUCJP : public nsMultiTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToEUCJP(); - -protected: - -}; +NS_METHOD +nsUnicodeToEUCJPConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToEUCJP_h___ */ diff --git a/intl/uconv/ucvja/nsUnicodeToJISx0201.cpp b/intl/uconv/ucvja/nsUnicodeToJISx0201.cpp index d4d78eb7f53d..b6f14d839780 100644 --- a/intl/uconv/ucvja/nsUnicodeToJISx0201.cpp +++ b/intl/uconv/ucvja/nsUnicodeToJISx0201.cpp @@ -38,6 +38,7 @@ #include "nsUnicodeToJISx0201.h" #include "nsUCVJADll.h" +#include "nsUCConstructors.h" // Shift Table static PRInt16 g0201ShiftTable[] = { @@ -45,12 +46,12 @@ static PRInt16 g0201ShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToJISx0201 [implementation] - -nsUnicodeToJISx0201::nsUnicodeToJISx0201() -: nsTableEncoderSupport((uShiftTable*) g0201ShiftTable, - (uMappingTable*) g_uf0201Mapping, 1) +NS_METHOD +nsUnicodeToJISx0201Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) g0201ShiftTable, + (uMappingTable*) g_uf0201Mapping, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvja/nsUnicodeToJISx0201.h b/intl/uconv/ucvja/nsUnicodeToJISx0201.h index 2f84900a329b..7ff2bc72ef16 100644 --- a/intl/uconv/ucvja/nsUnicodeToJISx0201.h +++ b/intl/uconv/ucvja/nsUnicodeToJISx0201.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToJISx0201_h___ #define nsUnicodeToJISx0201_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToJISx0201 [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to JISx0201. @@ -50,17 +47,8 @@ * @created 17/Feb/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToJISx0201 : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToJISx0201(); - -protected: - -}; +NS_METHOD +nsUnicodeToJISx0201Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToJISx0201_h___ */ diff --git a/intl/uconv/ucvja/nsUnicodeToJISx0208.cpp b/intl/uconv/ucvja/nsUnicodeToJISx0208.cpp index 9b940bd38ffb..475f6031d217 100644 --- a/intl/uconv/ucvja/nsUnicodeToJISx0208.cpp +++ b/intl/uconv/ucvja/nsUnicodeToJISx0208.cpp @@ -38,6 +38,7 @@ #include "nsUnicodeToJISx0208.h" #include "nsUCVJADll.h" +#include "nsUCConstructors.h" //---------------------------------------------------------------------- // Global functions and data [declaration] @@ -46,13 +47,14 @@ static PRInt16 g0208ShiftTable[] = { 0, u2BytesCharset, ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToJISx0208 [implementation] -nsUnicodeToJISx0208::nsUnicodeToJISx0208() -: nsTableEncoderSupport( (uShiftTable*) g0208ShiftTable, - (uMappingTable*) g_uf0208Mapping, - 2 /* max length = src * 2 */) +NS_METHOD +nsUnicodeToJISx0208Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) g0208ShiftTable, + (uMappingTable*) g_uf0208Mapping, + 2 /* max length = src * 2 */, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvja/nsUnicodeToJISx0208.h b/intl/uconv/ucvja/nsUnicodeToJISx0208.h index 6ddedcd215d0..534d147faae4 100644 --- a/intl/uconv/ucvja/nsUnicodeToJISx0208.h +++ b/intl/uconv/ucvja/nsUnicodeToJISx0208.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToJISx0208_h___ #define nsUnicodeToJISx0208_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToJISx0208 [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to JISx0208. @@ -50,17 +47,8 @@ * @created 17/Feb/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToJISx0208 : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToJISx0208(); - -protected: - -}; +NS_METHOD +nsUnicodeToJISx0208Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToJISx0208_h___ */ diff --git a/intl/uconv/ucvja/nsUnicodeToJISx0212.cpp b/intl/uconv/ucvja/nsUnicodeToJISx0212.cpp index 7cda2323c2f2..8aa1c4e19cfb 100644 --- a/intl/uconv/ucvja/nsUnicodeToJISx0212.cpp +++ b/intl/uconv/ucvja/nsUnicodeToJISx0212.cpp @@ -38,6 +38,7 @@ #include "nsUnicodeToJISx0212.h" #include "nsUCVJADll.h" +#include "nsUCConstructors.h" //---------------------------------------------------------------------- // Global functions and data [declaration] @@ -46,13 +47,14 @@ static PRInt16 g0212ShiftTable[] = { 0, u2BytesCharset, ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToJISx0212 [implementation] -nsUnicodeToJISx0212::nsUnicodeToJISx0212() -: nsTableEncoderSupport((uShiftTable*) g0212ShiftTable, - (uMappingTable*) g_uf0212Mapping, - 2 /* max len = src * 2 */) +NS_METHOD +nsUnicodeToJISx0212Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) g0212ShiftTable, + (uMappingTable*) g_uf0212Mapping, + 2 /* max len = src * 2 */, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvja/nsUnicodeToJISx0212.h b/intl/uconv/ucvja/nsUnicodeToJISx0212.h index bb90cfb4795f..d6c6ba073ecb 100644 --- a/intl/uconv/ucvja/nsUnicodeToJISx0212.h +++ b/intl/uconv/ucvja/nsUnicodeToJISx0212.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToJISx0212_h___ #define nsUnicodeToJISx0212_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToJISx0212 [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to JISx0212. @@ -50,17 +47,8 @@ * @created 17/Feb/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToJISx0212 : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToJISx0212(); - -protected: - -}; +NS_METHOD +nsUnicodeToJISx0212Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToJISx0212_h___ */ diff --git a/intl/uconv/ucvja/nsUnicodeToSJIS.cpp b/intl/uconv/ucvja/nsUnicodeToSJIS.cpp index 3a5d5361c70f..ad110baecb29 100644 --- a/intl/uconv/ucvja/nsUnicodeToSJIS.cpp +++ b/intl/uconv/ucvja/nsUnicodeToSJIS.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToSJIS.h" //---------------------------------------------------------------------- @@ -53,13 +54,13 @@ static const PRInt16 g_SJISShiftTable[] = { ShiftCell(u2BytesChar, 2, 0xE0, 0xFC, 0xE0, 0x40, 0xFC, 0xFC) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToSJIS [implementation] - -nsUnicodeToSJIS::nsUnicodeToSJIS() -: nsTableEncoderSupport((uShiftTable*) &g_SJISShiftTable, - (uMappingTable*) &g_SJISMappingTable, - 2 /* max length = src * 2 */) +NS_METHOD +nsUnicodeToSJISConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_SJISShiftTable, + (uMappingTable*) &g_SJISMappingTable, + 2 /* max length = src * 2 */, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvja/nsUnicodeToSJIS.h b/intl/uconv/ucvja/nsUnicodeToSJIS.h index f580977ad75b..6e86f452cee5 100644 --- a/intl/uconv/ucvja/nsUnicodeToSJIS.h +++ b/intl/uconv/ucvja/nsUnicodeToSJIS.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToSJIS_h___ #define nsUnicodeToSJIS_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToSJIS [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to SJIS. @@ -50,17 +47,8 @@ * @created 17/Feb/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToSJIS : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToSJIS(); - -protected: - -}; +NS_METHOD +nsUnicodeToSJISConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToSJIS_h___ */ diff --git a/intl/uconv/ucvko/nsCP949ToUnicode.cpp b/intl/uconv/ucvko/nsCP949ToUnicode.cpp index f2be95ee5435..5153262b6681 100644 --- a/intl/uconv/ucvko/nsCP949ToUnicode.cpp +++ b/intl/uconv/ucvko/nsCP949ToUnicode.cpp @@ -38,6 +38,7 @@ #include "nsCP949ToUnicode.h" #include "nsUCvKODll.h" +#include "nsUCConstructors.h" //---------------------------------------------------------------------- // Global functions and data [declaration] @@ -105,14 +106,14 @@ static const PRUint16 *g_CP949MappingTableSet [] ={ }; -//---------------------------------------------------------------------- -// Class nsCP949ToUnicode [implementation] - -nsCP949ToUnicode::nsCP949ToUnicode() -: nsMultiTableDecoderSupport(sizeof(g_CP949Ranges) / sizeof(g_CP949Ranges[0]), - (uRange*) &g_CP949Ranges, - (uShiftTable**) &g_CP949ShiftTableSet, - (uMappingTable**) &g_CP949MappingTableSet, 1) +NS_METHOD +nsCP949ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateMultiTableDecoder(sizeof(g_CP949Ranges) / sizeof(g_CP949Ranges[0]), + (uRange*) &g_CP949Ranges, + (uShiftTable**) &g_CP949ShiftTableSet, + (uMappingTable**) &g_CP949MappingTableSet, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvko/nsCP949ToUnicode.h b/intl/uconv/ucvko/nsCP949ToUnicode.h index fa6a6dc228c1..e681222724fb 100644 --- a/intl/uconv/ucvko/nsCP949ToUnicode.h +++ b/intl/uconv/ucvko/nsCP949ToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsCP949ToUnicode_h___ #define nsCP949ToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsCP949ToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from CP949 to Unicode. @@ -50,16 +47,8 @@ * @created 06/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsCP949ToUnicode : public nsMultiTableDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsCP949ToUnicode(); - -protected: -}; +NS_METHOD +nsCP949ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsCP949ToUnicode_h___ */ diff --git a/intl/uconv/ucvko/nsEUCKRToUnicode.cpp b/intl/uconv/ucvko/nsEUCKRToUnicode.cpp index 3df47f3b3b4a..d5117984d972 100644 --- a/intl/uconv/ucvko/nsEUCKRToUnicode.cpp +++ b/intl/uconv/ucvko/nsEUCKRToUnicode.cpp @@ -38,11 +38,11 @@ #include "nsEUCKRToUnicode.h" #include "nsUCvKODll.h" +#include "nsUCConstructors.h" -//---------------------------------------------------------------------- -// Class nsEUCKRToUnicode [implementation] - -nsEUCKRToUnicode::nsEUCKRToUnicode() -: nsCP949ToUnicode() +NS_METHOD +nsEUCKRToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return nsCP949ToUnicodeConstructor(aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvko/nsEUCKRToUnicode.h b/intl/uconv/ucvko/nsEUCKRToUnicode.h index 531881b1d552..befd1ebefe5c 100644 --- a/intl/uconv/ucvko/nsEUCKRToUnicode.h +++ b/intl/uconv/ucvko/nsEUCKRToUnicode.h @@ -39,12 +39,8 @@ #ifndef nsEUCKRToUnicode_h___ #define nsEUCKRToUnicode_h___ -#include "nsUCSupport.h" #include "nsCP949ToUnicode.h" -//---------------------------------------------------------------------- -// Class nsEUCKRToUnicode [declaration] - /** * A character set converter from EUCKR to Unicode. * @@ -52,14 +48,8 @@ * @author Catalin Rotaru [CATA] */ // Just make it an alias to CP949 decoder. bug 131388 -class nsEUCKRToUnicode : public nsCP949ToUnicode -{ -public: - - /** - * Class constructor. - */ - nsEUCKRToUnicode(); -}; +NS_METHOD +nsEUCKRToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsEUCKRToUnicode_h___ */ diff --git a/intl/uconv/ucvko/nsJohabToUnicode.cpp b/intl/uconv/ucvko/nsJohabToUnicode.cpp index 31e998aa8816..a486b28ad64f 100644 --- a/intl/uconv/ucvko/nsJohabToUnicode.cpp +++ b/intl/uconv/ucvko/nsJohabToUnicode.cpp @@ -38,6 +38,7 @@ #include "nsJohabToUnicode.h" #include "nsUCvKODll.h" +#include "nsUCConstructors.h" //---------------------------------------------------------------------- // Global functions and data [declaration] @@ -93,11 +94,14 @@ static const PRUint16 *g_JOHABMappingTableSet [] ={ //---------------------------------------------------------------------- // Class nsJohabToUnicode [implementation] -nsJohabToUnicode::nsJohabToUnicode() -: nsMultiTableDecoderSupport(sizeof(g_JOHABRanges) / sizeof(g_JOHABRanges[0]), - (uRange*) &g_JOHABRanges, - (uShiftTable**) &g_JOHABShiftTableSet, - (uMappingTable**) &g_JOHABMappingTableSet, 1) +NS_METHOD +nsJohabToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateMultiTableDecoder(sizeof(g_JOHABRanges) / sizeof(g_JOHABRanges[0]), + (uRange*) &g_JOHABRanges, + (uShiftTable**) &g_JOHABShiftTableSet, + (uMappingTable**) &g_JOHABMappingTableSet, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvko/nsJohabToUnicode.h b/intl/uconv/ucvko/nsJohabToUnicode.h index c820efa0fa45..c6ae1b32c291 100644 --- a/intl/uconv/ucvko/nsJohabToUnicode.h +++ b/intl/uconv/ucvko/nsJohabToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsJohabToUnicode_h___ #define nsJohabToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsJohabToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from Johab to Unicode. @@ -50,16 +47,8 @@ * @created 06/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsJohabToUnicode : public nsMultiTableDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsJohabToUnicode(); - -protected: -}; +NS_METHOD +nsJohabToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsJohabToUnicode_h___ */ diff --git a/intl/uconv/ucvko/nsUnicodeToCP949.cpp b/intl/uconv/ucvko/nsUnicodeToCP949.cpp index 1c65cadd4fd1..f90438dc80e6 100644 --- a/intl/uconv/ucvko/nsUnicodeToCP949.cpp +++ b/intl/uconv/ucvko/nsUnicodeToCP949.cpp @@ -39,6 +39,7 @@ #include "nsUnicodeToCP949.h" #include "nsUCvKODll.h" +#include "nsUCConstructors.h" //---------------------------------------------------------------------- // Global functions and data [declaration] @@ -77,14 +78,14 @@ static const PRUint16 *g_CP949ShiftTable[3] = { gCP949ShiftTable }; -//---------------------------------------------------------------------- -// Class nsUnicodeToEUCKR [implementation] - -nsUnicodeToCP949::nsUnicodeToCP949() -: nsMultiTableEncoderSupport(3, - (uShiftTable**) g_CP949ShiftTable, - (uMappingTable**) g_CP949MappingTable, - 2 /* max len = src * 2 */) +NS_METHOD +nsUnicodeToCP949Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateMultiTableEncoder(3, + (uShiftTable**) g_CP949ShiftTable, + (uMappingTable**) g_CP949MappingTable, + 2 /* max len = src * 2 */, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvko/nsUnicodeToCP949.h b/intl/uconv/ucvko/nsUnicodeToCP949.h index bd442163e7e0..cb5239d426b7 100644 --- a/intl/uconv/ucvko/nsUnicodeToCP949.h +++ b/intl/uconv/ucvko/nsUnicodeToCP949.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToCP949_h___ #define nsUnicodeToCP949_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToCP949 [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to CP949. @@ -50,16 +47,8 @@ * @created 14/May/2001 (patterned after Unicode to EUCKR converter * @author Jungshik Shin */ -class nsUnicodeToCP949 : public nsMultiTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToCP949(); - -protected: -}; +NS_METHOD +nsUnicodeToCP949Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToCP949_h___ */ diff --git a/intl/uconv/ucvko/nsUnicodeToEUCKR.cpp b/intl/uconv/ucvko/nsUnicodeToEUCKR.cpp index fb03473d867b..697c771fae0e 100644 --- a/intl/uconv/ucvko/nsUnicodeToEUCKR.cpp +++ b/intl/uconv/ucvko/nsUnicodeToEUCKR.cpp @@ -38,6 +38,7 @@ #include "nsUnicodeToEUCKR.h" #include "nsUCvKODll.h" +#include "nsUCConstructors.h" //---------------------------------------------------------------------- // Global functions and data [declaration] @@ -69,15 +70,15 @@ static const PRUint16 *g_EUCKRShiftTable[3] = { gDecomposedHangulShiftTable }; -//---------------------------------------------------------------------- -// Class nsUnicodeToEUCKR [implementation] - -nsUnicodeToEUCKR::nsUnicodeToEUCKR() -: nsMultiTableEncoderSupport(3, - (uShiftTable**) g_EUCKRShiftTable, - (uMappingTable**) g_EUCKRMappingTable, - // change from 2 to 8 because of composed jamo - 8 /* max length = src * 8 */) +NS_METHOD +nsUnicodeToEUCKRConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateMultiTableEncoder(3, + (uShiftTable**) g_EUCKRShiftTable, + (uMappingTable**) g_EUCKRMappingTable, + // change from 2 to 8 because of composed jamo + 8 /* max length = src * 8 */, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvko/nsUnicodeToEUCKR.h b/intl/uconv/ucvko/nsUnicodeToEUCKR.h index c143fad70c1c..958131599f87 100644 --- a/intl/uconv/ucvko/nsUnicodeToEUCKR.h +++ b/intl/uconv/ucvko/nsUnicodeToEUCKR.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToEUCKR_h___ #define nsUnicodeToEUCKR_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToEUCKR [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to EUCKR. @@ -50,16 +47,8 @@ * @created 06/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToEUCKR : public nsMultiTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToEUCKR(); - -protected: -}; +NS_METHOD +nsUnicodeToEUCKRConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToEUCKR_h___ */ diff --git a/intl/uconv/ucvko/nsUnicodeToJohab.cpp b/intl/uconv/ucvko/nsUnicodeToJohab.cpp index 7300713f8659..8b6a3e543f03 100644 --- a/intl/uconv/ucvko/nsUnicodeToJohab.cpp +++ b/intl/uconv/ucvko/nsUnicodeToJohab.cpp @@ -38,6 +38,7 @@ #include "nsUnicodeToJohab.h" #include "nsUCvKODll.h" +#include "nsUCConstructors.h" //---------------------------------------------------------------------- // Global functions and data [declaration] @@ -78,10 +79,13 @@ static const PRUint16 *g_JohabShiftTable[4] = { //---------------------------------------------------------------------- // Class nsUnicodeToJohab [implementation] -nsUnicodeToJohab::nsUnicodeToJohab() -: nsMultiTableEncoderSupport(sizeof(g_JohabShiftTable) / sizeof(g_JohabShiftTable[0]), - (uShiftTable**) g_JohabShiftTable, - (uMappingTable**) g_JohabMappingTable, - 2 /* max length = src * 2*/) -{ +NS_METHOD +nsUnicodeToJohabConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + + return CreateMultiTableEncoder(sizeof(g_JohabShiftTable) / sizeof(g_JohabShiftTable[0]), + (uShiftTable**) g_JohabShiftTable, + (uMappingTable**) g_JohabMappingTable, + 2 /* max length = src * 2*/, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvko/nsUnicodeToJohab.h b/intl/uconv/ucvko/nsUnicodeToJohab.h index e89c75faeedd..d1efb1ffc793 100644 --- a/intl/uconv/ucvko/nsUnicodeToJohab.h +++ b/intl/uconv/ucvko/nsUnicodeToJohab.h @@ -39,24 +39,14 @@ #ifndef nsUnicodeToJohab_h___ #define nsUnicodeToJohab_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToJohab [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to Johab. * */ -class nsUnicodeToJohab : public nsMultiTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToJohab(); - -}; +NS_METHOD +nsUnicodeToJohabConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToJohab_h___ */ diff --git a/intl/uconv/ucvko/nsUnicodeToJohabNoAscii.cpp b/intl/uconv/ucvko/nsUnicodeToJohabNoAscii.cpp index 96192986ccf2..9a63a80dcc2b 100644 --- a/intl/uconv/ucvko/nsUnicodeToJohabNoAscii.cpp +++ b/intl/uconv/ucvko/nsUnicodeToJohabNoAscii.cpp @@ -38,6 +38,7 @@ #include "nsUnicodeToJohabNoAscii.h" #include "nsUCvKODll.h" +#include "nsUCConstructors.h" //---------------------------------------------------------------------- // Global functions and data [declaration] @@ -70,13 +71,13 @@ static const PRUint16 *g_JohabShiftTable[3] = { }; -//---------------------------------------------------------------------- -// Class nsUnicodeToJohabNoAscii [implementation] - -nsUnicodeToJohabNoAscii::nsUnicodeToJohabNoAscii() -: nsMultiTableEncoderSupport(sizeof(g_JohabShiftTable) / sizeof(g_JohabShiftTable[0]), - (uShiftTable**) g_JohabShiftTable, - (uMappingTable**) g_JohabMappingTable, - 2 /* max length = src * 2 */) +NS_METHOD +nsUnicodeToJohabNoAsciiConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateMultiTableEncoder(sizeof(g_JohabShiftTable) / sizeof(g_JohabShiftTable[0]), + (uShiftTable**) g_JohabShiftTable, + (uMappingTable**) g_JohabMappingTable, + 2 /* max length = src * 2 */, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvko/nsUnicodeToJohabNoAscii.h b/intl/uconv/ucvko/nsUnicodeToJohabNoAscii.h index ec59bc5f5df6..5aec87cdaf6a 100644 --- a/intl/uconv/ucvko/nsUnicodeToJohabNoAscii.h +++ b/intl/uconv/ucvko/nsUnicodeToJohabNoAscii.h @@ -39,24 +39,14 @@ #ifndef nsUnicodeToJohabNoAscii_h___ #define nsUnicodeToJohabNoAscii_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToJohabNoAscii [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to Johab Sun Font encoding * ksc5601_1992-3 (Johab without US-ASCII) */ -class nsUnicodeToJohabNoAscii : public nsMultiTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToJohabNoAscii(); - -}; +NS_METHOD +nsUnicodeToJohabNoAsciiConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToJohabNoAscii_h___ */ diff --git a/intl/uconv/ucvko/nsUnicodeToKSC5601.cpp b/intl/uconv/ucvko/nsUnicodeToKSC5601.cpp index 81d4bdb47731..ae59fcfcf616 100644 --- a/intl/uconv/ucvko/nsUnicodeToKSC5601.cpp +++ b/intl/uconv/ucvko/nsUnicodeToKSC5601.cpp @@ -38,6 +38,7 @@ #include "nsUnicodeToKSC5601.h" #include "nsUCvKODll.h" +#include "nsUCConstructors.h" //---------------------------------------------------------------------- // Global functions and data [declaration] @@ -62,13 +63,13 @@ static const PRUint16 *g_ShiftTable[3] = { gDecomposedHangulShiftTable }; -//---------------------------------------------------------------------- -// Class nsUnicodeToKSC5601 [implementation] - -nsUnicodeToKSC5601::nsUnicodeToKSC5601() -: nsMultiTableEncoderSupport(2, (uShiftTable**) g_ShiftTable, - (uMappingTable**) g_MappingTable, - 8 /* max length = src * 8 */) +NS_METHOD +nsUnicodeToKSC5601Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateMultiTableEncoder(2, (uShiftTable**) g_ShiftTable, + (uMappingTable**) g_MappingTable, + 8 /* max length = src * 8 */, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvko/nsUnicodeToKSC5601.h b/intl/uconv/ucvko/nsUnicodeToKSC5601.h index 4b5a25f4ae7e..02cd0b374b61 100644 --- a/intl/uconv/ucvko/nsUnicodeToKSC5601.h +++ b/intl/uconv/ucvko/nsUnicodeToKSC5601.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToKSC5601_h___ #define nsUnicodeToKSC5601_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToKSC5601 [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to KSC5601. @@ -50,17 +47,7 @@ * @created 06/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToKSC5601 : public nsMultiTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToKSC5601(); - -protected: - -}; - +NS_METHOD +nsUnicodeToKSC5601Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToKSC5601_h___ */ diff --git a/intl/uconv/ucvlatin/nsARMSCII8ToUnicode.cpp b/intl/uconv/ucvlatin/nsARMSCII8ToUnicode.cpp index b3f0ad037786..19d501979bf7 100644 --- a/intl/uconv/ucvlatin/nsARMSCII8ToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsARMSCII8ToUnicode.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsARMSCII8ToUnicode.h" //---------------------------------------------------------------------- @@ -50,12 +51,12 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsARMSCII8ToUnicode [implementation] - -nsARMSCII8ToUnicode::nsARMSCII8ToUnicode() -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsARMSCII8ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsARMSCII8ToUnicode.h b/intl/uconv/ucvlatin/nsARMSCII8ToUnicode.h index f4e3248ab26b..a8c4a46e22f1 100644 --- a/intl/uconv/ucvlatin/nsARMSCII8ToUnicode.h +++ b/intl/uconv/ucvlatin/nsARMSCII8ToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsARMSCII8ToUnicode_h___ #define nsARMSCII8ToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsARMSCII8ToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from ARMSCII8 to Unicode. @@ -50,15 +47,8 @@ * @created 4/26/1999 * @author Frank Tang [ftang] */ -class nsARMSCII8ToUnicode : public nsOneByteDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsARMSCII8ToUnicode(); - -}; +NS_METHOD +nsARMSCII8ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsARMSCII8ToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsAsciiToUnicode.cpp b/intl/uconv/ucvlatin/nsAsciiToUnicode.cpp index ff02d950c578..5158e7fd82c5 100644 --- a/intl/uconv/ucvlatin/nsAsciiToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsAsciiToUnicode.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsAsciiToUnicode.h" //---------------------------------------------------------------------- @@ -50,11 +51,11 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsAsciiToUnicode [implementation] - -nsAsciiToUnicode::nsAsciiToUnicode() -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsAsciiToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsAsciiToUnicode.h b/intl/uconv/ucvlatin/nsAsciiToUnicode.h index a8b4b39ad6f3..28a6ae0effdf 100644 --- a/intl/uconv/ucvlatin/nsAsciiToUnicode.h +++ b/intl/uconv/ucvlatin/nsAsciiToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsAsciiToUnicode_h___ #define nsAsciiToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsAsciiToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from Ascii to Unicode. @@ -50,15 +47,8 @@ * @created 23/Nov/1998 * @author Catalin Rotaru [CATA] */ -class nsAsciiToUnicode : public nsOneByteDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsAsciiToUnicode(); - -}; +NS_METHOD +nsAsciiToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsAsciiToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsCP1250ToUnicode.cpp b/intl/uconv/ucvlatin/nsCP1250ToUnicode.cpp index 772f490f8a19..f3ac5460b959 100644 --- a/intl/uconv/ucvlatin/nsCP1250ToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsCP1250ToUnicode.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsCP1250ToUnicode.h" //---------------------------------------------------------------------- @@ -50,12 +51,12 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsCP1250ToUnicode [implementation] - -nsCP1250ToUnicode::nsCP1250ToUnicode() -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsCP1250ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsCP1250ToUnicode.h b/intl/uconv/ucvlatin/nsCP1250ToUnicode.h index f2ed1b98b899..04d55f0c9b6e 100644 --- a/intl/uconv/ucvlatin/nsCP1250ToUnicode.h +++ b/intl/uconv/ucvlatin/nsCP1250ToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsCP1250ToUnicode_h___ #define nsCP1250ToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsCP1250ToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from CP1250 to Unicode. @@ -50,16 +47,7 @@ * @created 20/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsCP1250ToUnicode : public nsOneByteDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsCP1250ToUnicode(); - - -}; - +NS_METHOD +nsCP1250ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsCP1250ToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsCP1251ToUnicode.cpp b/intl/uconv/ucvlatin/nsCP1251ToUnicode.cpp index 422412653ee3..8475c9ca2aba 100644 --- a/intl/uconv/ucvlatin/nsCP1251ToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsCP1251ToUnicode.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsCP1251ToUnicode.h" //---------------------------------------------------------------------- @@ -50,11 +51,11 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsCP1251ToUnicode [implementation] - -nsCP1251ToUnicode::nsCP1251ToUnicode() -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsCP1251ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsCP1251ToUnicode.h b/intl/uconv/ucvlatin/nsCP1251ToUnicode.h index db064c364206..22605fff18b8 100644 --- a/intl/uconv/ucvlatin/nsCP1251ToUnicode.h +++ b/intl/uconv/ucvlatin/nsCP1251ToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsCP1251ToUnicode_h___ #define nsCP1251ToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsCP1251ToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from CP1251 to Unicode. @@ -50,15 +47,8 @@ * @created 20/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsCP1251ToUnicode : public nsOneByteDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsCP1251ToUnicode(); - -}; +NS_METHOD +nsCP1251ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsCP1251ToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsCP1253ToUnicode.cpp b/intl/uconv/ucvlatin/nsCP1253ToUnicode.cpp index 0178ba9cbd95..e4cb4452b2a1 100644 --- a/intl/uconv/ucvlatin/nsCP1253ToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsCP1253ToUnicode.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsCP1253ToUnicode.h" //---------------------------------------------------------------------- @@ -50,12 +51,12 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsCP1253ToUnicode [implementation] - -nsCP1253ToUnicode::nsCP1253ToUnicode() -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsCP1253ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsCP1253ToUnicode.h b/intl/uconv/ucvlatin/nsCP1253ToUnicode.h index ec443db70daa..424c623a8af5 100644 --- a/intl/uconv/ucvlatin/nsCP1253ToUnicode.h +++ b/intl/uconv/ucvlatin/nsCP1253ToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsCP1253ToUnicode_h___ #define nsCP1253ToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsCP1253ToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from CP1253 to Unicode. @@ -50,15 +47,8 @@ * @created 20/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsCP1253ToUnicode : public nsOneByteDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsCP1253ToUnicode(); - -}; +NS_METHOD +nsCP1253ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsCP1253ToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsCP1254ToUnicode.cpp b/intl/uconv/ucvlatin/nsCP1254ToUnicode.cpp index 2f3d0d6a8bab..cd59de9a6002 100644 --- a/intl/uconv/ucvlatin/nsCP1254ToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsCP1254ToUnicode.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsCP1254ToUnicode.h" //---------------------------------------------------------------------- @@ -50,11 +51,11 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsCP1254ToUnicode [implementation] - -nsCP1254ToUnicode::nsCP1254ToUnicode() -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsCP1254ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsCP1254ToUnicode.h b/intl/uconv/ucvlatin/nsCP1254ToUnicode.h index 4b712a7bcc39..4b4dba82f3c0 100644 --- a/intl/uconv/ucvlatin/nsCP1254ToUnicode.h +++ b/intl/uconv/ucvlatin/nsCP1254ToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsCP1254ToUnicode_h___ #define nsCP1254ToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsCP1254ToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from CP1254 to Unicode. @@ -50,15 +47,8 @@ * @created 20/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsCP1254ToUnicode : public nsOneByteDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsCP1254ToUnicode(); - -}; +NS_METHOD +nsCP1254ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsCP1254ToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsCP1255ToUnicode.cpp b/intl/uconv/ucvlatin/nsCP1255ToUnicode.cpp index 976c1962e196..9c8d61d41eb1 100644 --- a/intl/uconv/ucvlatin/nsCP1255ToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsCP1255ToUnicode.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsCP1255ToUnicode.h" //---------------------------------------------------------------------- @@ -50,11 +51,11 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsCP1255ToUnicode [implementation] - -nsCP1255ToUnicode::nsCP1255ToUnicode() -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsCP1255ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsCP1255ToUnicode.h b/intl/uconv/ucvlatin/nsCP1255ToUnicode.h index 473cbef5c0d3..c05a604dbcd6 100644 --- a/intl/uconv/ucvlatin/nsCP1255ToUnicode.h +++ b/intl/uconv/ucvlatin/nsCP1255ToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsCP1255ToUnicode_h___ #define nsCP1255ToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsCP1255ToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from CP1255 to Unicode. @@ -50,15 +47,9 @@ * @created 20/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsCP1255ToUnicode : public nsOneByteDecoderSupport -{ -public: - /** - * Class constructor. - */ - nsCP1255ToUnicode(); - -}; +NS_METHOD +nsCP1255ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsCP1255ToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsCP1256ToUnicode.cpp b/intl/uconv/ucvlatin/nsCP1256ToUnicode.cpp index 1333f14781a4..80766075ba76 100644 --- a/intl/uconv/ucvlatin/nsCP1256ToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsCP1256ToUnicode.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsCP1256ToUnicode.h" //---------------------------------------------------------------------- @@ -50,12 +51,12 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsCP1256ToUnicode [implementation] - -nsCP1256ToUnicode::nsCP1256ToUnicode() -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsCP1256ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsCP1256ToUnicode.h b/intl/uconv/ucvlatin/nsCP1256ToUnicode.h index 8de0537ebebd..40bc3af4c05a 100644 --- a/intl/uconv/ucvlatin/nsCP1256ToUnicode.h +++ b/intl/uconv/ucvlatin/nsCP1256ToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsCP1256ToUnicode_h___ #define nsCP1256ToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsCP1256ToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from CP1256 to Unicode. @@ -50,14 +47,8 @@ * @created 20/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsCP1256ToUnicode : public nsOneByteDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsCP1256ToUnicode(); -}; +NS_METHOD +nsCP1256ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsCP1256ToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsCP1257ToUnicode.cpp b/intl/uconv/ucvlatin/nsCP1257ToUnicode.cpp index c8a4ea540a35..ce7d6379b59e 100644 --- a/intl/uconv/ucvlatin/nsCP1257ToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsCP1257ToUnicode.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsCP1257ToUnicode.h" //---------------------------------------------------------------------- @@ -50,11 +51,11 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsCP1257ToUnicode [implementation] - -nsCP1257ToUnicode::nsCP1257ToUnicode() -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsCP1257ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsCP1257ToUnicode.h b/intl/uconv/ucvlatin/nsCP1257ToUnicode.h index cc49e4389377..6e8095838f5c 100644 --- a/intl/uconv/ucvlatin/nsCP1257ToUnicode.h +++ b/intl/uconv/ucvlatin/nsCP1257ToUnicode.h @@ -39,7 +39,7 @@ #ifndef nsCP1257ToUnicode_h___ #define nsCP1257ToUnicode_h___ -#include "nsUCSupport.h" +#include "nsISupports.h" //---------------------------------------------------------------------- // Class nsCP1257ToUnicode [declaration] @@ -50,15 +50,8 @@ * @created 20/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsCP1257ToUnicode : public nsOneByteDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsCP1257ToUnicode(); - -}; +NS_METHOD +nsCP1257ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsCP1257ToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsCP1258ToUnicode.cpp b/intl/uconv/ucvlatin/nsCP1258ToUnicode.cpp index c811d7f3d46f..f75c79928ac4 100644 --- a/intl/uconv/ucvlatin/nsCP1258ToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsCP1258ToUnicode.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsCP1258ToUnicode.h" //---------------------------------------------------------------------- @@ -50,12 +51,12 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsCP1258ToUnicode [implementation] - -nsCP1258ToUnicode::nsCP1258ToUnicode() -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsCP1258ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsCP1258ToUnicode.h b/intl/uconv/ucvlatin/nsCP1258ToUnicode.h index cbc50dd0746e..6e56c2c56294 100644 --- a/intl/uconv/ucvlatin/nsCP1258ToUnicode.h +++ b/intl/uconv/ucvlatin/nsCP1258ToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsCP1258ToUnicode_h___ #define nsCP1258ToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsCP1258ToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from CP1258 to Unicode. @@ -50,15 +47,8 @@ * @created 4/26/1999 * @author Frank Tang [ftang] */ -class nsCP1258ToUnicode : public nsOneByteDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsCP1258ToUnicode(); - -}; +NS_METHOD +nsCP1258ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsCP1258ToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsCP866ToUnicode.cpp b/intl/uconv/ucvlatin/nsCP866ToUnicode.cpp index 07fc55f9d4f2..ea01128e746c 100644 --- a/intl/uconv/ucvlatin/nsCP866ToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsCP866ToUnicode.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsCP866ToUnicode.h" //---------------------------------------------------------------------- @@ -50,13 +51,13 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsCP866ToUnicode [implementation] - -nsCP866ToUnicode::nsCP866ToUnicode() -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsCP866ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsCP866ToUnicode.h b/intl/uconv/ucvlatin/nsCP866ToUnicode.h index bafd4dacdbe7..e2fe65c75823 100644 --- a/intl/uconv/ucvlatin/nsCP866ToUnicode.h +++ b/intl/uconv/ucvlatin/nsCP866ToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsCP866ToUnicode_h___ #define nsCP866ToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsCP866ToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from CP866 to Unicode. @@ -50,15 +47,8 @@ * @created 20/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsCP866ToUnicode : public nsOneByteDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsCP866ToUnicode(); - -}; +NS_METHOD +nsCP866ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsCP866ToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsCP874ToUnicode.cpp b/intl/uconv/ucvlatin/nsCP874ToUnicode.cpp index 7186b2411192..576c702b668b 100644 --- a/intl/uconv/ucvlatin/nsCP874ToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsCP874ToUnicode.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsCP874ToUnicode.h" //---------------------------------------------------------------------- @@ -50,11 +51,11 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsCP874ToUnicode [implementation] - -nsCP874ToUnicode::nsCP874ToUnicode() -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsCP874ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsCP874ToUnicode.h b/intl/uconv/ucvlatin/nsCP874ToUnicode.h index c65583d87aa6..ec877cb77a43 100644 --- a/intl/uconv/ucvlatin/nsCP874ToUnicode.h +++ b/intl/uconv/ucvlatin/nsCP874ToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsCP874ToUnicode_h___ #define nsCP874ToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsCP874ToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from CP874 to Unicode. @@ -50,15 +47,8 @@ * @created 4/26/1999 * @author Frank Tang [ftang] */ -class nsCP874ToUnicode : public nsOneByteDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsCP874ToUnicode(); - -}; +NS_METHOD +nsCP874ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsCP874ToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsGEOSTD8ToUnicode.cpp b/intl/uconv/ucvlatin/nsGEOSTD8ToUnicode.cpp index d6dc3a2e96a2..0ed852864375 100644 --- a/intl/uconv/ucvlatin/nsGEOSTD8ToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsGEOSTD8ToUnicode.cpp @@ -20,6 +20,7 @@ * Contributor(s): */ +#include "nsUCConstructors.h" #include "nsGEOSTD8ToUnicode.h" //---------------------------------------------------------------------- @@ -34,12 +35,12 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsGEOSTD8ToUnicode [implementation] - -nsGEOSTD8ToUnicode::nsGEOSTD8ToUnicode() -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsGEOSTD8ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsGEOSTD8ToUnicode.h b/intl/uconv/ucvlatin/nsGEOSTD8ToUnicode.h index ff5e4ae39a7e..777949f01617 100644 --- a/intl/uconv/ucvlatin/nsGEOSTD8ToUnicode.h +++ b/intl/uconv/ucvlatin/nsGEOSTD8ToUnicode.h @@ -23,24 +23,14 @@ #ifndef nsGEOSTD8ToUnicode_h___ #define nsGEOSTD8ToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsGEOSTD8ToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from GEOSTD8 to Unicode. * */ -class nsGEOSTD8ToUnicode : public nsOneByteDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsGEOSTD8ToUnicode(); - -}; +NS_METHOD +nsGEOSTD8ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsGEOSTD8ToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsISO885910ToUnicode.cpp b/intl/uconv/ucvlatin/nsISO885910ToUnicode.cpp index f50e3999dd56..8bcf8b9b0c9e 100644 --- a/intl/uconv/ucvlatin/nsISO885910ToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsISO885910ToUnicode.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsISO885910ToUnicode.h" //---------------------------------------------------------------------- @@ -50,11 +51,12 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsISO885910ToUnicode [implementation] - -nsISO885910ToUnicode::nsISO885910ToUnicode() -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsISO885910ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } + diff --git a/intl/uconv/ucvlatin/nsISO885910ToUnicode.h b/intl/uconv/ucvlatin/nsISO885910ToUnicode.h index cf7ca4d7b94d..eb225c3ffa60 100644 --- a/intl/uconv/ucvlatin/nsISO885910ToUnicode.h +++ b/intl/uconv/ucvlatin/nsISO885910ToUnicode.h @@ -39,7 +39,7 @@ #ifndef nsISO885910ToUnicode_h___ #define nsISO885910ToUnicode_h___ -#include "nsUCSupport.h" +#include "nsISupports.h" //---------------------------------------------------------------------- // Class nsISO885910ToUnicode [declaration] @@ -50,15 +50,8 @@ * @created 23/Nov/1998 * @author Catalin Rotaru [CATA] */ -class nsISO885910ToUnicode : public nsOneByteDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsISO885910ToUnicode(); - -}; +NS_METHOD +nsISO885910ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsISO885910ToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsISO885913ToUnicode.cpp b/intl/uconv/ucvlatin/nsISO885913ToUnicode.cpp index 7daf462bd080..5b33bdd8c046 100644 --- a/intl/uconv/ucvlatin/nsISO885913ToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsISO885913ToUnicode.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsISO885913ToUnicode.h" //---------------------------------------------------------------------- @@ -50,12 +51,12 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsISO885913ToUnicode [implementation] - -nsISO885913ToUnicode::nsISO885913ToUnicode() -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsISO885913ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsISO885913ToUnicode.h b/intl/uconv/ucvlatin/nsISO885913ToUnicode.h index 758d46c98b02..3c381c28c2ae 100644 --- a/intl/uconv/ucvlatin/nsISO885913ToUnicode.h +++ b/intl/uconv/ucvlatin/nsISO885913ToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsISO885913ToUnicode_h___ #define nsISO885913ToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsISO885913ToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from ISO885913 to Unicode. @@ -50,15 +47,8 @@ * @created 05/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsISO885913ToUnicode : public nsOneByteDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsISO885913ToUnicode(); - -}; +NS_METHOD +nsISO885913ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsISO885913ToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsISO885914ToUnicode.cpp b/intl/uconv/ucvlatin/nsISO885914ToUnicode.cpp index 476a28216b20..5f930aab63ee 100644 --- a/intl/uconv/ucvlatin/nsISO885914ToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsISO885914ToUnicode.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsISO885914ToUnicode.h" //---------------------------------------------------------------------- @@ -50,11 +51,11 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsISO885914ToUnicode [implementation] - -nsISO885914ToUnicode::nsISO885914ToUnicode() -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsISO885914ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsISO885914ToUnicode.h b/intl/uconv/ucvlatin/nsISO885914ToUnicode.h index 80485ccb2357..89ad18041f6b 100644 --- a/intl/uconv/ucvlatin/nsISO885914ToUnicode.h +++ b/intl/uconv/ucvlatin/nsISO885914ToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsISO885914ToUnicode_h___ #define nsISO885914ToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsISO885914ToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from ISO885914 to Unicode. @@ -50,15 +47,8 @@ * @created 4/26/1999 * @author Frank Tang [ftang] */ -class nsISO885914ToUnicode : public nsOneByteDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsISO885914ToUnicode(); - -}; +NS_METHOD +nsISO885914ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsISO885914ToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsISO885915ToUnicode.cpp b/intl/uconv/ucvlatin/nsISO885915ToUnicode.cpp index b17a5de252fa..5f26fd434301 100644 --- a/intl/uconv/ucvlatin/nsISO885915ToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsISO885915ToUnicode.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsISO885915ToUnicode.h" //---------------------------------------------------------------------- @@ -50,11 +51,11 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsISO885915ToUnicode [implementation] - -nsISO885915ToUnicode::nsISO885915ToUnicode() -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsISO885915ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsISO885915ToUnicode.h b/intl/uconv/ucvlatin/nsISO885915ToUnicode.h index 3524d6e6e01b..d3e23debc708 100644 --- a/intl/uconv/ucvlatin/nsISO885915ToUnicode.h +++ b/intl/uconv/ucvlatin/nsISO885915ToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsISO885915ToUnicode_h___ #define nsISO885915ToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsISO885915ToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from ISO885915 to Unicode. @@ -50,15 +47,8 @@ * @created 4/26/1999 * @author Frank Tang [ftang] */ -class nsISO885915ToUnicode : public nsOneByteDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsISO885915ToUnicode(); - -}; +NS_METHOD +nsISO885915ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsISO885915ToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsISO885916ToUnicode.cpp b/intl/uconv/ucvlatin/nsISO885916ToUnicode.cpp index 34738fded1d5..dc55f382d2ac 100644 --- a/intl/uconv/ucvlatin/nsISO885916ToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsISO885916ToUnicode.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsISO885916ToUnicode.h" //---------------------------------------------------------------------- @@ -50,11 +51,11 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsISO885916ToUnicode [implementation] - -nsISO885916ToUnicode::nsISO885916ToUnicode() -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsISO885916ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsISO885916ToUnicode.h b/intl/uconv/ucvlatin/nsISO885916ToUnicode.h index fb90e2421861..c1482d21ab44 100644 --- a/intl/uconv/ucvlatin/nsISO885916ToUnicode.h +++ b/intl/uconv/ucvlatin/nsISO885916ToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsISO885916ToUnicode_h___ #define nsISO885916ToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsISO885916ToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from ISO885916 to Unicode. @@ -50,15 +47,8 @@ * @created 4/26/1999 * @author Frank Tang [ftang] */ -class nsISO885916ToUnicode : public nsOneByteDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsISO885916ToUnicode(); - -}; +NS_METHOD +nsISO885916ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsISO885916ToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsISO88592ToUnicode.cpp b/intl/uconv/ucvlatin/nsISO88592ToUnicode.cpp index 2c0f91f5ab5d..b068e6843658 100644 --- a/intl/uconv/ucvlatin/nsISO88592ToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsISO88592ToUnicode.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsISO88592ToUnicode.h" //---------------------------------------------------------------------- @@ -50,12 +51,12 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsISO88592ToUnicode [implementation] - -nsISO88592ToUnicode::nsISO88592ToUnicode() -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsISO88592ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsISO88592ToUnicode.h b/intl/uconv/ucvlatin/nsISO88592ToUnicode.h index 9e599af0caec..9166800432c8 100644 --- a/intl/uconv/ucvlatin/nsISO88592ToUnicode.h +++ b/intl/uconv/ucvlatin/nsISO88592ToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsISO88592ToUnicode_h___ #define nsISO88592ToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsISO88592ToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from ISO88592 to Unicode. @@ -50,15 +47,8 @@ * @created 05/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsISO88592ToUnicode : public nsOneByteDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsISO88592ToUnicode(); - -}; +NS_METHOD +nsISO88592ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsISO88592ToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsISO88593ToUnicode.cpp b/intl/uconv/ucvlatin/nsISO88593ToUnicode.cpp index a967a44e8794..e9b141868538 100644 --- a/intl/uconv/ucvlatin/nsISO88593ToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsISO88593ToUnicode.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsISO88593ToUnicode.h" //---------------------------------------------------------------------- @@ -50,12 +51,12 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsISO88593ToUnicode [implementation] - -nsISO88593ToUnicode::nsISO88593ToUnicode() -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsISO88593ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsISO88593ToUnicode.h b/intl/uconv/ucvlatin/nsISO88593ToUnicode.h index 3777f1b2ff6b..df0142d56cdb 100644 --- a/intl/uconv/ucvlatin/nsISO88593ToUnicode.h +++ b/intl/uconv/ucvlatin/nsISO88593ToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsISO88593ToUnicode_h___ #define nsISO88593ToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsISO88593ToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from ISO88593 to Unicode. @@ -50,15 +47,8 @@ * @created 20/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsISO88593ToUnicode : public nsOneByteDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsISO88593ToUnicode(); - -}; +NS_METHOD +nsISO88593ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsISO88593ToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsISO88594ToUnicode.cpp b/intl/uconv/ucvlatin/nsISO88594ToUnicode.cpp index d8c192d92f49..5db49a51094f 100644 --- a/intl/uconv/ucvlatin/nsISO88594ToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsISO88594ToUnicode.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsISO88594ToUnicode.h" //---------------------------------------------------------------------- @@ -50,13 +51,13 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsISO88594ToUnicode [implementation] - -nsISO88594ToUnicode::nsISO88594ToUnicode() -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsISO88594ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsISO88594ToUnicode.h b/intl/uconv/ucvlatin/nsISO88594ToUnicode.h index 9ff1b3c7014c..ac39c0e5fcba 100644 --- a/intl/uconv/ucvlatin/nsISO88594ToUnicode.h +++ b/intl/uconv/ucvlatin/nsISO88594ToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsISO88594ToUnicode_h___ #define nsISO88594ToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsISO88594ToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from ISO88594 to Unicode. @@ -50,15 +47,8 @@ * @created 20/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsISO88594ToUnicode : public nsOneByteDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsISO88594ToUnicode(); - -}; +NS_METHOD +nsISO88594ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsISO88594ToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsISO88595ToUnicode.cpp b/intl/uconv/ucvlatin/nsISO88595ToUnicode.cpp index ef2c59136ea9..1f35b0c6d460 100644 --- a/intl/uconv/ucvlatin/nsISO88595ToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsISO88595ToUnicode.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsISO88595ToUnicode.h" //---------------------------------------------------------------------- @@ -50,12 +51,12 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsISO88595ToUnicode [implementation] - -nsISO88595ToUnicode::nsISO88595ToUnicode() -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsISO88595ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsISO88595ToUnicode.h b/intl/uconv/ucvlatin/nsISO88595ToUnicode.h index bf4a2c571a5c..3569f3361183 100644 --- a/intl/uconv/ucvlatin/nsISO88595ToUnicode.h +++ b/intl/uconv/ucvlatin/nsISO88595ToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsISO88595ToUnicode_h___ #define nsISO88595ToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsISO88595ToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from ISO88595 to Unicode. @@ -50,15 +47,8 @@ * @created 20/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsISO88595ToUnicode : public nsOneByteDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsISO88595ToUnicode(); - -}; +NS_METHOD +nsISO88595ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsISO88595ToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsISO88596EToUnicode.cpp b/intl/uconv/ucvlatin/nsISO88596EToUnicode.cpp index 2a77748c9ac5..0ee09ef35cb7 100644 --- a/intl/uconv/ucvlatin/nsISO88596EToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsISO88596EToUnicode.cpp @@ -36,17 +36,17 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsISO88596ToUnicode.h" #include "nsISO88596EToUnicode.h" //---------------------------------------------------------------------- // Global functions and data [declaration] -//---------------------------------------------------------------------- -// Class nsISO88596EToUnicode [implementation] - -nsISO88596EToUnicode::nsISO88596EToUnicode() -: nsISO88596ToUnicode() +NS_METHOD +nsISO88596EToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return nsISO88596ToUnicodeConstructor(aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsISO88596EToUnicode.h b/intl/uconv/ucvlatin/nsISO88596EToUnicode.h index be06ca48a179..848f0b16fb9d 100644 --- a/intl/uconv/ucvlatin/nsISO88596EToUnicode.h +++ b/intl/uconv/ucvlatin/nsISO88596EToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsISO88596EToUnicode_h___ #define nsISO88596EToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsISO88596EToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from ISO88596 to Unicode. @@ -50,15 +47,8 @@ * @created 20/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsISO88596EToUnicode : public nsISO88596ToUnicode -{ -public: - - /** - * Class constructor. - */ - nsISO88596EToUnicode(); - -}; +NS_METHOD +nsISO88596EToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsISO88596EToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsISO88596IToUnicode.cpp b/intl/uconv/ucvlatin/nsISO88596IToUnicode.cpp index 529ee5d475cf..0720422dab2e 100644 --- a/intl/uconv/ucvlatin/nsISO88596IToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsISO88596IToUnicode.cpp @@ -36,14 +36,14 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsISO88596ToUnicode.h" #include "nsISO88596IToUnicode.h" -//---------------------------------------------------------------------- -// Class nsISO88596IToUnicode [implementation] - -nsISO88596IToUnicode::nsISO88596IToUnicode() -: nsISO88596ToUnicode() +NS_METHOD +nsISO88596IToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return nsISO88596ToUnicodeConstructor(aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsISO88596IToUnicode.h b/intl/uconv/ucvlatin/nsISO88596IToUnicode.h index ebe49ecd0db0..e1186705cbaf 100644 --- a/intl/uconv/ucvlatin/nsISO88596IToUnicode.h +++ b/intl/uconv/ucvlatin/nsISO88596IToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsISO88596IToUnicode_h___ #define nsISO88596IToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsISO88596IToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from ISO88596I to Unicode. @@ -50,15 +47,8 @@ * @created 20/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsISO88596IToUnicode : public nsISO88596ToUnicode -{ -public: - - /** - * Class constructor. - */ - nsISO88596IToUnicode(); - -}; +NS_METHOD +nsISO88596IToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsISO88596IToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsISO88596ToUnicode.cpp b/intl/uconv/ucvlatin/nsISO88596ToUnicode.cpp index 8d5739fc3f75..74d9dd6035ab 100644 --- a/intl/uconv/ucvlatin/nsISO88596ToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsISO88596ToUnicode.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsISO88596ToUnicode.h" //---------------------------------------------------------------------- @@ -50,12 +51,12 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsISO88596ToUnicode [implementation] - -nsISO88596ToUnicode::nsISO88596ToUnicode() -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsISO88596ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsISO88596ToUnicode.h b/intl/uconv/ucvlatin/nsISO88596ToUnicode.h index 0e4556cc8b2a..dccb03a4cf11 100644 --- a/intl/uconv/ucvlatin/nsISO88596ToUnicode.h +++ b/intl/uconv/ucvlatin/nsISO88596ToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsISO88596ToUnicode_h___ #define nsISO88596ToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsISO88596ToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from ISO88596 to Unicode. @@ -50,15 +47,8 @@ * @created 20/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsISO88596ToUnicode : public nsOneByteDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsISO88596ToUnicode(); - -}; +NS_METHOD +nsISO88596ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsISO88596ToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsISO88597ToUnicode.cpp b/intl/uconv/ucvlatin/nsISO88597ToUnicode.cpp index dd3d57206fb1..88758a0d053e 100644 --- a/intl/uconv/ucvlatin/nsISO88597ToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsISO88597ToUnicode.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsISO88597ToUnicode.h" //---------------------------------------------------------------------- @@ -50,12 +51,12 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsISO88597ToUnicode [implementation] - -nsISO88597ToUnicode::nsISO88597ToUnicode() -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsISO88597ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsISO88597ToUnicode.h b/intl/uconv/ucvlatin/nsISO88597ToUnicode.h index 9785620089e1..51d00f1dafff 100644 --- a/intl/uconv/ucvlatin/nsISO88597ToUnicode.h +++ b/intl/uconv/ucvlatin/nsISO88597ToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsISO88597ToUnicode_h___ #define nsISO88597ToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsISO88597ToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from ISO-8859-7 to Unicode. @@ -50,15 +47,8 @@ * @created 23/Mar/1998 * @author Catalin Rotaru [CATA] */ -class nsISO88597ToUnicode : public nsOneByteDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsISO88597ToUnicode(); - -}; +NS_METHOD +nsISO88597ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsISO88597ToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsISO88598EToUnicode.cpp b/intl/uconv/ucvlatin/nsISO88598EToUnicode.cpp index 85f74b281266..c3eeab457f30 100644 --- a/intl/uconv/ucvlatin/nsISO88598EToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsISO88598EToUnicode.cpp @@ -36,17 +36,17 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsISO88598ToUnicode.h" #include "nsISO88598EToUnicode.h" //---------------------------------------------------------------------- // Global functions and data [declaration] -//---------------------------------------------------------------------- -// Class nsISO88598EToUnicode [implementation] - -nsISO88598EToUnicode::nsISO88598EToUnicode() -: nsISO88598ToUnicode() +NS_METHOD +nsISO88598EToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return nsISO88598ToUnicodeConstructor(aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsISO88598EToUnicode.h b/intl/uconv/ucvlatin/nsISO88598EToUnicode.h index b3a6cf8542e6..5a853f6e6200 100644 --- a/intl/uconv/ucvlatin/nsISO88598EToUnicode.h +++ b/intl/uconv/ucvlatin/nsISO88598EToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsISO88598EToUnicode_h___ #define nsISO88598EToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsISO88598EToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from ISO88598 to Unicode. @@ -50,15 +47,8 @@ * @created 20/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsISO88598EToUnicode : public nsISO88598ToUnicode -{ -public: - - /** - * Class constructor. - */ - nsISO88598EToUnicode(); - -}; +NS_METHOD +nsISO88598EToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsISO88598EToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsISO88598IToUnicode.cpp b/intl/uconv/ucvlatin/nsISO88598IToUnicode.cpp index 781029fdcbba..d3524661ae6c 100644 --- a/intl/uconv/ucvlatin/nsISO88598IToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsISO88598IToUnicode.cpp @@ -36,17 +36,17 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsISO88598ToUnicode.h" #include "nsISO88598IToUnicode.h" //---------------------------------------------------------------------- // Global functions and data [declaration] -//---------------------------------------------------------------------- -// Class nsISO88598IToUnicode [implementation] - -nsISO88598IToUnicode::nsISO88598IToUnicode() -: nsISO88598ToUnicode() +NS_METHOD +nsISO88598IToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return nsISO88598ToUnicodeConstructor(aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsISO88598IToUnicode.h b/intl/uconv/ucvlatin/nsISO88598IToUnicode.h index 42b6e888eeb5..5f32e757abc7 100644 --- a/intl/uconv/ucvlatin/nsISO88598IToUnicode.h +++ b/intl/uconv/ucvlatin/nsISO88598IToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsISO88598IToUnicode_h___ #define nsISO88598IToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsISO88598IToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from ISO88598 to Unicode. @@ -50,16 +47,9 @@ * @created 20/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsISO88598IToUnicode : public nsISO88598ToUnicode -{ -public: - - /** - * Class constructor. - */ - nsISO88598IToUnicode(); - -}; +NS_METHOD +nsISO88598IToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsISO88598IToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsISO88598ToUnicode.cpp b/intl/uconv/ucvlatin/nsISO88598ToUnicode.cpp index d5cd0020faea..5612b45b9d63 100644 --- a/intl/uconv/ucvlatin/nsISO88598ToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsISO88598ToUnicode.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsISO88598ToUnicode.h" //---------------------------------------------------------------------- @@ -50,12 +51,12 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsISO88598ToUnicode [implementation] - -nsISO88598ToUnicode::nsISO88598ToUnicode() -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsISO88598ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsISO88598ToUnicode.h b/intl/uconv/ucvlatin/nsISO88598ToUnicode.h index bda24a5f61ae..7b504bdba756 100644 --- a/intl/uconv/ucvlatin/nsISO88598ToUnicode.h +++ b/intl/uconv/ucvlatin/nsISO88598ToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsISO88598ToUnicode_h___ #define nsISO88598ToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsISO88598ToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from ISO88598 to Unicode. @@ -50,15 +47,8 @@ * @created 20/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsISO88598ToUnicode : public nsOneByteDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsISO88598ToUnicode(); - -}; +NS_METHOD +nsISO88598ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsISO88598ToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsISO88599ToUnicode.cpp b/intl/uconv/ucvlatin/nsISO88599ToUnicode.cpp index f6d15ce48b64..cf792491e9c5 100644 --- a/intl/uconv/ucvlatin/nsISO88599ToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsISO88599ToUnicode.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsISO88599ToUnicode.h" //---------------------------------------------------------------------- @@ -50,11 +51,11 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsISO88599ToUnicode [implementation] - -nsISO88599ToUnicode::nsISO88599ToUnicode() -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsISO88599ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsISO88599ToUnicode.h b/intl/uconv/ucvlatin/nsISO88599ToUnicode.h index 4c47d1ac61d7..0e51641e493b 100644 --- a/intl/uconv/ucvlatin/nsISO88599ToUnicode.h +++ b/intl/uconv/ucvlatin/nsISO88599ToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsISO88599ToUnicode_h___ #define nsISO88599ToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsISO88599ToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from ISO88599 to Unicode. @@ -50,15 +47,8 @@ * @created 05/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsISO88599ToUnicode : public nsOneByteDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsISO88599ToUnicode(); - -}; +NS_METHOD +nsISO88599ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsISO88599ToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsISOIR111ToUnicode.cpp b/intl/uconv/ucvlatin/nsISOIR111ToUnicode.cpp index 47e483a10c49..d0b5826137fc 100644 --- a/intl/uconv/ucvlatin/nsISOIR111ToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsISOIR111ToUnicode.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsISOIR111ToUnicode.h" //---------------------------------------------------------------------- @@ -50,11 +51,11 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsISOIR111ToUnicode [implementation] - -nsISOIR111ToUnicode::nsISOIR111ToUnicode() -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsISOIR111ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsISOIR111ToUnicode.h b/intl/uconv/ucvlatin/nsISOIR111ToUnicode.h index b7321fa30af3..57c014e45f70 100644 --- a/intl/uconv/ucvlatin/nsISOIR111ToUnicode.h +++ b/intl/uconv/ucvlatin/nsISOIR111ToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsISOIR111ToUnicode_h___ #define nsISOIR111ToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsISOIR111ToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from ISOIR111 to Unicode. @@ -50,15 +47,8 @@ * @created 23/Nov/1998 * @author Catalin Rotaru [CATA] */ -class nsISOIR111ToUnicode : public nsOneByteDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsISOIR111ToUnicode(); - -}; +NS_METHOD +nsISOIR111ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsISOIR111ToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsKOI8RToUnicode.cpp b/intl/uconv/ucvlatin/nsKOI8RToUnicode.cpp index 8bce4b6ce71d..d4e75953cf88 100644 --- a/intl/uconv/ucvlatin/nsKOI8RToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsKOI8RToUnicode.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsKOI8RToUnicode.h" //---------------------------------------------------------------------- @@ -50,12 +51,12 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsKOI8RToUnicode [implementation] - -nsKOI8RToUnicode::nsKOI8RToUnicode() -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsKOI8RToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsKOI8RToUnicode.h b/intl/uconv/ucvlatin/nsKOI8RToUnicode.h index 16b5037d5867..ec21ea986c1b 100644 --- a/intl/uconv/ucvlatin/nsKOI8RToUnicode.h +++ b/intl/uconv/ucvlatin/nsKOI8RToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsKOI8RToUnicode_h___ #define nsKOI8RToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsKOI8RToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from KOI8R to Unicode. @@ -50,15 +47,8 @@ * @created 4/26/1999 * @author Frank Tang [ftang] */ -class nsKOI8RToUnicode : public nsOneByteDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsKOI8RToUnicode(); - -}; +NS_METHOD +nsKOI8RToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsKOI8RToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsKOI8UToUnicode.cpp b/intl/uconv/ucvlatin/nsKOI8UToUnicode.cpp index bfdb3552c644..837abcc0caf0 100644 --- a/intl/uconv/ucvlatin/nsKOI8UToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsKOI8UToUnicode.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsKOI8UToUnicode.h" //---------------------------------------------------------------------- @@ -50,11 +51,11 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsKOI8UToUnicode [implementation] - -nsKOI8UToUnicode::nsKOI8UToUnicode() -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsKOI8UToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsKOI8UToUnicode.h b/intl/uconv/ucvlatin/nsKOI8UToUnicode.h index c120ebfcd6b7..64120dfb24d5 100644 --- a/intl/uconv/ucvlatin/nsKOI8UToUnicode.h +++ b/intl/uconv/ucvlatin/nsKOI8UToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsKOI8UToUnicode_h___ #define nsKOI8UToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsKOI8UToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from KOI8U to Unicode. @@ -50,15 +47,8 @@ * @created 4/26/1999 * @author Frank Tang [ftang] */ -class nsKOI8UToUnicode : public nsOneByteDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsKOI8UToUnicode(); - -}; +NS_METHOD +nsKOI8UToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsKOI8UToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsMacArabicToUnicode.cpp b/intl/uconv/ucvlatin/nsMacArabicToUnicode.cpp index 026ba9f93872..20027114adb1 100644 --- a/intl/uconv/ucvlatin/nsMacArabicToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsMacArabicToUnicode.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsMacArabicToUnicode.h" //---------------------------------------------------------------------- @@ -50,10 +51,11 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- - -nsMacArabicToUnicode::nsMacArabicToUnicode() - : nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsMacArabicToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsMacArabicToUnicode.h b/intl/uconv/ucvlatin/nsMacArabicToUnicode.h index 5e73df2f3bc3..15f2e3503f87 100644 --- a/intl/uconv/ucvlatin/nsMacArabicToUnicode.h +++ b/intl/uconv/ucvlatin/nsMacArabicToUnicode.h @@ -39,23 +39,13 @@ #ifndef nsMacArabicToUnicode_h___ #define nsMacArabicToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsMacArabicToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from MacArabic to Unicode. */ -class nsMacArabicToUnicode : public nsOneByteDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsMacArabicToUnicode(); - -}; +NS_METHOD +nsMacArabicToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsMacArabicToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsMacCEToUnicode.cpp b/intl/uconv/ucvlatin/nsMacCEToUnicode.cpp index 6c4f6ce2b109..f43e2d366f53 100644 --- a/intl/uconv/ucvlatin/nsMacCEToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsMacCEToUnicode.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsMacCEToUnicode.h" //---------------------------------------------------------------------- @@ -50,12 +51,12 @@ static const PRInt16 g_MacCEShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsMacCEToUnicode [implementation] - -nsMacCEToUnicode::nsMacCEToUnicode() -: nsTableDecoderSupport((uShiftTable*) &g_MacCEShiftTable, - (uMappingTable*) &g_MacCEMappingTable, 1) +NS_METHOD +nsMacCEToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableDecoder((uShiftTable*) &g_MacCEShiftTable, + (uMappingTable*) &g_MacCEMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsMacCEToUnicode.h b/intl/uconv/ucvlatin/nsMacCEToUnicode.h index 7647dcbd9852..eb4990c9e22e 100644 --- a/intl/uconv/ucvlatin/nsMacCEToUnicode.h +++ b/intl/uconv/ucvlatin/nsMacCEToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsMacCEToUnicode_h___ #define nsMacCEToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsMacCEToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from MacCE to Unicode. @@ -50,15 +47,8 @@ * @created 05/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsMacCEToUnicode : public nsTableDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsMacCEToUnicode(); - -}; +NS_METHOD +nsMacCEToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsMacCEToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsMacCroatianToUnicode.cpp b/intl/uconv/ucvlatin/nsMacCroatianToUnicode.cpp index 65fdd91359ed..7d1bc82ac66b 100644 --- a/intl/uconv/ucvlatin/nsMacCroatianToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsMacCroatianToUnicode.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsMacCroatianToUnicode.h" //---------------------------------------------------------------------- @@ -50,12 +51,12 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsMacCroatianToUnicode [implementation] - -nsMacCroatianToUnicode::nsMacCroatianToUnicode() -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsMacCroatianToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsMacCroatianToUnicode.h b/intl/uconv/ucvlatin/nsMacCroatianToUnicode.h index 756d1f3245bb..0cc7e8d8546c 100644 --- a/intl/uconv/ucvlatin/nsMacCroatianToUnicode.h +++ b/intl/uconv/ucvlatin/nsMacCroatianToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsMacCroatianToUnicode_h___ #define nsMacCroatianToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsMacCroatianToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from MacCroatian to Unicode. @@ -50,15 +47,8 @@ * @created 4/26/1999 * @author Frank Tang [ftang] */ -class nsMacCroatianToUnicode : public nsOneByteDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsMacCroatianToUnicode(); - -}; +NS_METHOD +nsMacCroatianToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsMacCroatianToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsMacCyrillicToUnicode.cpp b/intl/uconv/ucvlatin/nsMacCyrillicToUnicode.cpp index 5dc212ca8f6c..eef8aa52708f 100644 --- a/intl/uconv/ucvlatin/nsMacCyrillicToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsMacCyrillicToUnicode.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsMacCyrillicToUnicode.h" //---------------------------------------------------------------------- @@ -50,12 +51,12 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsMacCyrillicToUnicode [implementation] - -nsMacCyrillicToUnicode::nsMacCyrillicToUnicode() -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsMacCyrillicToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsMacCyrillicToUnicode.h b/intl/uconv/ucvlatin/nsMacCyrillicToUnicode.h index b7d34d054395..2392c49945a0 100644 --- a/intl/uconv/ucvlatin/nsMacCyrillicToUnicode.h +++ b/intl/uconv/ucvlatin/nsMacCyrillicToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsMacCyrillicToUnicode_h___ #define nsMacCyrillicToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsMacCyrillicToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from MacCyrillic to Unicode. @@ -50,15 +47,8 @@ * @created 4/26/1999 * @author Frank Tang [ftang] */ -class nsMacCyrillicToUnicode : public nsOneByteDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsMacCyrillicToUnicode(); - -}; +NS_METHOD +nsMacCyrillicToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsMacCyrillicToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsMacDevanagariToUnicode.cpp b/intl/uconv/ucvlatin/nsMacDevanagariToUnicode.cpp index 9475abe85e43..6460ed75b83b 100644 --- a/intl/uconv/ucvlatin/nsMacDevanagariToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsMacDevanagariToUnicode.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsMacDevanagariToUnicode.h" //---------------------------------------------------------------------- @@ -50,10 +51,11 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- - -nsMacDevanagariToUnicode::nsMacDevanagariToUnicode() - : nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsMacDevanagariToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsMacDevanagariToUnicode.h b/intl/uconv/ucvlatin/nsMacDevanagariToUnicode.h index f3e306d05e0a..8fb0d111ba52 100644 --- a/intl/uconv/ucvlatin/nsMacDevanagariToUnicode.h +++ b/intl/uconv/ucvlatin/nsMacDevanagariToUnicode.h @@ -39,23 +39,13 @@ #ifndef nsMacDevanagariToUnicode_h___ #define nsMacDevanagariToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsMacDevanagariToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from MacDevanagari to Unicode. */ -class nsMacDevanagariToUnicode : public nsOneByteDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsMacDevanagariToUnicode(); - -}; +NS_METHOD +nsMacDevanagariToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsMacDevanagariToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsMacFarsiToUnicode.cpp b/intl/uconv/ucvlatin/nsMacFarsiToUnicode.cpp index 2110ffda6a16..5335c6515ff3 100644 --- a/intl/uconv/ucvlatin/nsMacFarsiToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsMacFarsiToUnicode.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsMacFarsiToUnicode.h" //---------------------------------------------------------------------- @@ -50,10 +51,11 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- - -nsMacFarsiToUnicode::nsMacFarsiToUnicode() - : nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsMacFarsiToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsMacFarsiToUnicode.h b/intl/uconv/ucvlatin/nsMacFarsiToUnicode.h index 5de1e3d3d1c3..7e529357d436 100644 --- a/intl/uconv/ucvlatin/nsMacFarsiToUnicode.h +++ b/intl/uconv/ucvlatin/nsMacFarsiToUnicode.h @@ -39,23 +39,13 @@ #ifndef nsMacFarsiToUnicode_h___ #define nsMacFarsiToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsMacFarsiToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from MacFarsi to Unicode. */ -class nsMacFarsiToUnicode : public nsOneByteDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsMacFarsiToUnicode(); - -}; +NS_METHOD +nsMacFarsiToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsMacFarsiToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsMacGreekToUnicode.cpp b/intl/uconv/ucvlatin/nsMacGreekToUnicode.cpp index 392aba01b6fb..e2421bd1c801 100644 --- a/intl/uconv/ucvlatin/nsMacGreekToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsMacGreekToUnicode.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsMacGreekToUnicode.h" //---------------------------------------------------------------------- @@ -50,12 +51,12 @@ static const PRInt16 g_MacGreekShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsMacGreekToUnicode [implementation] - -nsMacGreekToUnicode::nsMacGreekToUnicode() -: nsTableDecoderSupport((uShiftTable*) &g_MacGreekShiftTable, - (uMappingTable*) &g_MacGreekMappingTable, 1) +NS_METHOD +nsMacGreekToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableDecoder((uShiftTable*) &g_MacGreekShiftTable, + (uMappingTable*) &g_MacGreekMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsMacGreekToUnicode.h b/intl/uconv/ucvlatin/nsMacGreekToUnicode.h index 7931db90c191..c656e9a31267 100644 --- a/intl/uconv/ucvlatin/nsMacGreekToUnicode.h +++ b/intl/uconv/ucvlatin/nsMacGreekToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsMacGreekToUnicode_h___ #define nsMacGreekToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsMacGreekToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from MacGreek to Unicode. @@ -50,15 +47,8 @@ * @created 05/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsMacGreekToUnicode : public nsTableDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsMacGreekToUnicode(); - -}; +NS_METHOD +nsMacGreekToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsMacGreekToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsMacGujaratiToUnicode.cpp b/intl/uconv/ucvlatin/nsMacGujaratiToUnicode.cpp index d8578231cad3..3a2f978f623c 100644 --- a/intl/uconv/ucvlatin/nsMacGujaratiToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsMacGujaratiToUnicode.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsMacGujaratiToUnicode.h" //---------------------------------------------------------------------- @@ -50,10 +51,11 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- - -nsMacGujaratiToUnicode::nsMacGujaratiToUnicode() - : nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsMacGujaratiToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsMacGujaratiToUnicode.h b/intl/uconv/ucvlatin/nsMacGujaratiToUnicode.h index df20222d699c..c050cfa5e6d9 100644 --- a/intl/uconv/ucvlatin/nsMacGujaratiToUnicode.h +++ b/intl/uconv/ucvlatin/nsMacGujaratiToUnicode.h @@ -39,23 +39,13 @@ #ifndef nsMacGujaratiToUnicode_h___ #define nsMacGujaratiToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsMacGujaratiToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from MacGujarati to Unicode. */ -class nsMacGujaratiToUnicode : public nsOneByteDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsMacGujaratiToUnicode(); - -}; +NS_METHOD +nsMacGujaratiToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsMacGujaratiToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsMacGurmukhiToUnicode.cpp b/intl/uconv/ucvlatin/nsMacGurmukhiToUnicode.cpp index df2e83789d16..0b317a5a5e21 100644 --- a/intl/uconv/ucvlatin/nsMacGurmukhiToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsMacGurmukhiToUnicode.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsMacGurmukhiToUnicode.h" //---------------------------------------------------------------------- @@ -50,10 +51,11 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- - -nsMacGurmukhiToUnicode::nsMacGurmukhiToUnicode() - : nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsMacGurmukhiToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsMacGurmukhiToUnicode.h b/intl/uconv/ucvlatin/nsMacGurmukhiToUnicode.h index 1d7e68efbf30..f943e0532a6d 100644 --- a/intl/uconv/ucvlatin/nsMacGurmukhiToUnicode.h +++ b/intl/uconv/ucvlatin/nsMacGurmukhiToUnicode.h @@ -39,23 +39,13 @@ #ifndef nsMacGurmukhiToUnicode_h___ #define nsMacGurmukhiToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsMacGurmukhiToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from MacGurmukhi to Unicode. */ -class nsMacGurmukhiToUnicode : public nsOneByteDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsMacGurmukhiToUnicode(); - -}; +NS_METHOD +nsMacGurmukhiToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsMacGurmukhiToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsMacHebrewToUnicode.cpp b/intl/uconv/ucvlatin/nsMacHebrewToUnicode.cpp index b3e934fc8bb4..6d96f85262f7 100644 --- a/intl/uconv/ucvlatin/nsMacHebrewToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsMacHebrewToUnicode.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsMacHebrewToUnicode.h" //---------------------------------------------------------------------- @@ -50,10 +51,11 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- - -nsMacHebrewToUnicode::nsMacHebrewToUnicode() - : nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsMacHebrewToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsMacHebrewToUnicode.h b/intl/uconv/ucvlatin/nsMacHebrewToUnicode.h index 2f71bcc80085..0f2c1328ad90 100644 --- a/intl/uconv/ucvlatin/nsMacHebrewToUnicode.h +++ b/intl/uconv/ucvlatin/nsMacHebrewToUnicode.h @@ -39,23 +39,13 @@ #ifndef nsMacHebrewToUnicode_h___ #define nsMacHebrewToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsMacHebrewToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from MacHebrew to Unicode. */ -class nsMacHebrewToUnicode : public nsOneByteDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsMacHebrewToUnicode(); - -}; +NS_METHOD +nsMacHebrewToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsMacHebrewToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsMacIcelandicToUnicode.cpp b/intl/uconv/ucvlatin/nsMacIcelandicToUnicode.cpp index 055809e8b963..e92f30a99216 100644 --- a/intl/uconv/ucvlatin/nsMacIcelandicToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsMacIcelandicToUnicode.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsMacIcelandicToUnicode.h" //---------------------------------------------------------------------- @@ -50,11 +51,11 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsMacIcelandicToUnicode [implementation] - -nsMacIcelandicToUnicode::nsMacIcelandicToUnicode() -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsMacIcelandicToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsMacIcelandicToUnicode.h b/intl/uconv/ucvlatin/nsMacIcelandicToUnicode.h index 098a9365a57a..c3488d715e9e 100644 --- a/intl/uconv/ucvlatin/nsMacIcelandicToUnicode.h +++ b/intl/uconv/ucvlatin/nsMacIcelandicToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsMacIcelandicToUnicode_h___ #define nsMacIcelandicToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsMacIcelandicToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from MacIcelandic to Unicode. @@ -50,15 +47,8 @@ * @created 4/26/1999 * @author Frank Tang [ftang] */ -class nsMacIcelandicToUnicode : public nsOneByteDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsMacIcelandicToUnicode(); - -}; +NS_METHOD +nsMacIcelandicToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsMacIcelandicToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsMacRomanianToUnicode.cpp b/intl/uconv/ucvlatin/nsMacRomanianToUnicode.cpp index 80b15ce4140a..e77c96bc86b0 100644 --- a/intl/uconv/ucvlatin/nsMacRomanianToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsMacRomanianToUnicode.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsMacRomanianToUnicode.h" //---------------------------------------------------------------------- @@ -50,11 +51,11 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsMacRomanianToUnicode [implementation] - -nsMacRomanianToUnicode::nsMacRomanianToUnicode() -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsMacRomanianToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsMacRomanianToUnicode.h b/intl/uconv/ucvlatin/nsMacRomanianToUnicode.h index 5d3a67454cc7..235385d88a12 100644 --- a/intl/uconv/ucvlatin/nsMacRomanianToUnicode.h +++ b/intl/uconv/ucvlatin/nsMacRomanianToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsMacRomanianToUnicode_h___ #define nsMacRomanianToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsMacRomanianToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from MacRomanian to Unicode. @@ -50,15 +47,8 @@ * @created 4/26/1999 * @author Frank Tang [ftang] */ -class nsMacRomanianToUnicode : public nsOneByteDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsMacRomanianToUnicode(); - -}; +NS_METHOD +nsMacRomanianToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsMacRomanianToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsMacTurkishToUnicode.cpp b/intl/uconv/ucvlatin/nsMacTurkishToUnicode.cpp index 6661b1dd1c0c..f6460d3bdcc5 100644 --- a/intl/uconv/ucvlatin/nsMacTurkishToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsMacTurkishToUnicode.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsMacTurkishToUnicode.h" //---------------------------------------------------------------------- @@ -50,11 +51,11 @@ static const PRInt16 g_MacTurkishShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsMacTurkishToUnicode [implementation] - -nsMacTurkishToUnicode::nsMacTurkishToUnicode() -: nsTableDecoderSupport((uShiftTable*) &g_MacTurkishShiftTable, - (uMappingTable*) &g_MacTurkishMappingTable, 1) +NS_METHOD +nsMacTurkishToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableDecoder((uShiftTable*) &g_MacTurkishShiftTable, + (uMappingTable*) &g_MacTurkishMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsMacTurkishToUnicode.h b/intl/uconv/ucvlatin/nsMacTurkishToUnicode.h index 3eff47ff7def..d17304ead725 100644 --- a/intl/uconv/ucvlatin/nsMacTurkishToUnicode.h +++ b/intl/uconv/ucvlatin/nsMacTurkishToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsMacTurkishToUnicode_h___ #define nsMacTurkishToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsMacTurkishToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from MacTurkish to Unicode. @@ -50,15 +47,8 @@ * @created 05/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsMacTurkishToUnicode : public nsTableDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsMacTurkishToUnicode(); - -}; +NS_METHOD +nsMacTurkishToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsMacTurkishToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsMacUkrainianToUnicode.cpp b/intl/uconv/ucvlatin/nsMacUkrainianToUnicode.cpp index fe7538d8b305..cd4a87d1ec05 100644 --- a/intl/uconv/ucvlatin/nsMacUkrainianToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsMacUkrainianToUnicode.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsMacUkrainianToUnicode.h" //---------------------------------------------------------------------- @@ -50,11 +51,11 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsMacUkrainianToUnicode [implementation] - -nsMacUkrainianToUnicode::nsMacUkrainianToUnicode() -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsMacUkrainianToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsMacUkrainianToUnicode.h b/intl/uconv/ucvlatin/nsMacUkrainianToUnicode.h index 6b5dc310dd13..dd27527d01d9 100644 --- a/intl/uconv/ucvlatin/nsMacUkrainianToUnicode.h +++ b/intl/uconv/ucvlatin/nsMacUkrainianToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsMacUkrainianToUnicode_h___ #define nsMacUkrainianToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsMacUkrainianToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from MacUkrainian to Unicode. @@ -50,15 +47,8 @@ * @created 4/26/1999 * @author Frank Tang [ftang] */ -class nsMacUkrainianToUnicode : public nsOneByteDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsMacUkrainianToUnicode(); - -}; +NS_METHOD +nsMacUkrainianToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsMacUkrainianToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsT61ToUnicode.cpp b/intl/uconv/ucvlatin/nsT61ToUnicode.cpp index 8bdac7f5285b..9d8a5193e05c 100644 --- a/intl/uconv/ucvlatin/nsT61ToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsT61ToUnicode.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsT61ToUnicode.h" //---------------------------------------------------------------------- @@ -53,12 +54,12 @@ static const PRInt16 g_T61ShiftTable[] = { ShiftCell(u2BytesChar, 2, 0xC0, 0xCF, 0xC0, 0x41, 0xCF, 0x7A) }; -//---------------------------------------------------------------------- -// Class nsT61ToUnicode [implementation] - -nsT61ToUnicode::nsT61ToUnicode() -: nsTableDecoderSupport((uShiftTable*) &g_T61ShiftTable, - (uMappingTable*) &g_T61MappingTable, 1) +NS_METHOD +nsT61ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableDecoder((uShiftTable*) &g_T61ShiftTable, + (uMappingTable*) &g_T61MappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsT61ToUnicode.h b/intl/uconv/ucvlatin/nsT61ToUnicode.h index 1bec274b3997..725a088f40d4 100644 --- a/intl/uconv/ucvlatin/nsT61ToUnicode.h +++ b/intl/uconv/ucvlatin/nsT61ToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsT61ToUnicode_h___ #define nsT61ToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsT61ToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from T61 to Unicode. @@ -50,15 +47,8 @@ * @created 18/Mar/1998 * @author Catalin Rotaru [CATA] */ -class nsT61ToUnicode : public nsTableDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsT61ToUnicode(); - -}; +NS_METHOD +nsT61ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsT61ToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsTCVN5712ToUnicode.cpp b/intl/uconv/ucvlatin/nsTCVN5712ToUnicode.cpp index 593daa1527c7..e15cd99cca54 100644 --- a/intl/uconv/ucvlatin/nsTCVN5712ToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsTCVN5712ToUnicode.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsTCVN5712ToUnicode.h" //---------------------------------------------------------------------- @@ -50,11 +51,11 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsTCVN5712ToUnicode [implementation] - -nsTCVN5712ToUnicode::nsTCVN5712ToUnicode() -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsTCVN5712ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsTCVN5712ToUnicode.h b/intl/uconv/ucvlatin/nsTCVN5712ToUnicode.h index 014c6dd489c6..5580cacbaab9 100644 --- a/intl/uconv/ucvlatin/nsTCVN5712ToUnicode.h +++ b/intl/uconv/ucvlatin/nsTCVN5712ToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsTCVN5712ToUnicode_h___ #define nsTCVN5712ToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsTCVN5712ToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from TCVN5712 to Unicode. @@ -50,15 +47,8 @@ * @created 4/26/1999 * @author Frank Tang [ftang] */ -class nsTCVN5712ToUnicode : public nsOneByteDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsTCVN5712ToUnicode(); - -}; +NS_METHOD +nsTCVN5712ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsTCVN5712ToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsUCS2BEToUnicode.cpp b/intl/uconv/ucvlatin/nsUCS2BEToUnicode.cpp index a907a93c0911..abb8d50742a3 100644 --- a/intl/uconv/ucvlatin/nsUCS2BEToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsUCS2BEToUnicode.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUCS2BEToUnicode.h" #include "nsUCvLatinDll.h" #include diff --git a/intl/uconv/ucvlatin/nsUnicodeToARMSCII8.cpp b/intl/uconv/ucvlatin/nsUnicodeToARMSCII8.cpp index 616e8685feb9..df8874fb22e8 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToARMSCII8.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToARMSCII8.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToARMSCII8.h" //---------------------------------------------------------------------- @@ -50,12 +51,12 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToARMSCII8 [implementation] - -nsUnicodeToARMSCII8::nsUnicodeToARMSCII8() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToARMSCII8Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToARMSCII8.h b/intl/uconv/ucvlatin/nsUnicodeToARMSCII8.h index 8fb49cfc0591..0a71320ce593 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToARMSCII8.h +++ b/intl/uconv/ucvlatin/nsUnicodeToARMSCII8.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToARMSCII8_h___ #define nsUnicodeToARMSCII8_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToARMSCII8 [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to ARMSCII8. @@ -50,15 +47,8 @@ * @created 4/26/1999 * @author Frank Tang [ftang] */ -class nsUnicodeToARMSCII8 : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToARMSCII8(); - -}; +NS_METHOD +nsUnicodeToARMSCII8Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToARMSCII8_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToAscii.cpp b/intl/uconv/ucvlatin/nsUnicodeToAscii.cpp index c80d7768fd5f..4f6191d56c56 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToAscii.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToAscii.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToAscii.h" //---------------------------------------------------------------------- @@ -50,12 +51,12 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToAscii [implementation] - -nsUnicodeToAscii::nsUnicodeToAscii() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToAsciiConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToAscii.h b/intl/uconv/ucvlatin/nsUnicodeToAscii.h index 47ad7781dce1..7eb3c7330bbb 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToAscii.h +++ b/intl/uconv/ucvlatin/nsUnicodeToAscii.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToAscii_h___ #define nsUnicodeToAscii_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToAscii [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to Ascii. @@ -50,15 +47,8 @@ * @created 17/Feb/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToAscii : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToAscii(); - -}; +NS_METHOD +nsUnicodeToAsciiConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToAscii_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToCP1250.cpp b/intl/uconv/ucvlatin/nsUnicodeToCP1250.cpp index 479b8af565a2..784603e4948b 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToCP1250.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToCP1250.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToCP1250.h" //---------------------------------------------------------------------- @@ -50,12 +51,12 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToCP1250 [implementation] - -nsUnicodeToCP1250::nsUnicodeToCP1250() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToCP1250Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToCP1250.h b/intl/uconv/ucvlatin/nsUnicodeToCP1250.h index 1276483fb254..037503729798 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToCP1250.h +++ b/intl/uconv/ucvlatin/nsUnicodeToCP1250.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToCP1250_h___ #define nsUnicodeToCP1250_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToCP1250 [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to CP1250. @@ -50,15 +47,8 @@ * @created 20/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToCP1250 : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToCP1250(); - -}; +NS_METHOD +nsUnicodeToCP1250Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToCP1250_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToCP1251.cpp b/intl/uconv/ucvlatin/nsUnicodeToCP1251.cpp index d094f32da0b0..cf47dcdfd026 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToCP1251.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToCP1251.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToCP1251.h" //---------------------------------------------------------------------- @@ -50,12 +51,12 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToCP1251 [implementation] - -nsUnicodeToCP1251::nsUnicodeToCP1251() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToCP1251Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToCP1251.h b/intl/uconv/ucvlatin/nsUnicodeToCP1251.h index 565a519d39af..8b15536d2079 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToCP1251.h +++ b/intl/uconv/ucvlatin/nsUnicodeToCP1251.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToCP1251_h___ #define nsUnicodeToCP1251_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToCP1251 [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to CP1251. @@ -50,15 +47,8 @@ * @created 20/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToCP1251 : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToCP1251(); - -}; +NS_METHOD +nsUnicodeToCP1251Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToCP1251_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToCP1253.cpp b/intl/uconv/ucvlatin/nsUnicodeToCP1253.cpp index fcce5ddb807f..c12b2612672e 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToCP1253.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToCP1253.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToCP1253.h" //---------------------------------------------------------------------- @@ -50,12 +51,12 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToCP1253 [implementation] - -nsUnicodeToCP1253::nsUnicodeToCP1253() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToCP1253Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToCP1253.h b/intl/uconv/ucvlatin/nsUnicodeToCP1253.h index f6e54450f42e..5154ca52d33e 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToCP1253.h +++ b/intl/uconv/ucvlatin/nsUnicodeToCP1253.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToCP1253_h___ #define nsUnicodeToCP1253_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToCP1253 [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to CP1253. @@ -50,15 +47,8 @@ * @created 20/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToCP1253 : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToCP1253(); - -}; +NS_METHOD +nsUnicodeToCP1253Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToCP1253_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToCP1254.cpp b/intl/uconv/ucvlatin/nsUnicodeToCP1254.cpp index d7fb705e9da3..a0d0dde43bc4 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToCP1254.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToCP1254.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToCP1254.h" //---------------------------------------------------------------------- @@ -50,12 +51,12 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToCP1254 [implementation] - -nsUnicodeToCP1254::nsUnicodeToCP1254() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToCP1254Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToCP1254.h b/intl/uconv/ucvlatin/nsUnicodeToCP1254.h index ed6a72468113..152b320b41e9 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToCP1254.h +++ b/intl/uconv/ucvlatin/nsUnicodeToCP1254.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToCP1254_h___ #define nsUnicodeToCP1254_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToCP1254 [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to CP1254. @@ -50,15 +47,8 @@ * @created 20/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToCP1254 : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToCP1254(); - -}; +NS_METHOD +nsUnicodeToCP1254Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToCP1254_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToCP1255.cpp b/intl/uconv/ucvlatin/nsUnicodeToCP1255.cpp index b7965e6050a8..1c5660f2a2cf 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToCP1255.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToCP1255.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToCP1255.h" //---------------------------------------------------------------------- @@ -50,12 +51,12 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToCP1255 [implementation] - -nsUnicodeToCP1255::nsUnicodeToCP1255() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToCP1255Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToCP1255.h b/intl/uconv/ucvlatin/nsUnicodeToCP1255.h index 4222aa8623d2..44d5078f2fd2 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToCP1255.h +++ b/intl/uconv/ucvlatin/nsUnicodeToCP1255.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToCP1255_h___ #define nsUnicodeToCP1255_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToCP1255 [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to CP1255. @@ -50,15 +47,8 @@ * @created 20/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToCP1255 : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToCP1255(); - -}; +NS_METHOD +nsUnicodeToCP1255Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToCP1255_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToCP1256.cpp b/intl/uconv/ucvlatin/nsUnicodeToCP1256.cpp index 73b8dac7e6ad..4a974543dca5 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToCP1256.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToCP1256.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToCP1256.h" //---------------------------------------------------------------------- @@ -50,12 +51,12 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToCP1256 [implementation] - -nsUnicodeToCP1256::nsUnicodeToCP1256() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToCP1256Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToCP1256.h b/intl/uconv/ucvlatin/nsUnicodeToCP1256.h index 2549993c22a9..1866f082ea82 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToCP1256.h +++ b/intl/uconv/ucvlatin/nsUnicodeToCP1256.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToCP1256_h___ #define nsUnicodeToCP1256_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToCP1256 [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to CP1256. @@ -50,15 +47,8 @@ * @created 20/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToCP1256 : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToCP1256(); - -}; +NS_METHOD +nsUnicodeToCP1256Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToCP1256_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToCP1257.cpp b/intl/uconv/ucvlatin/nsUnicodeToCP1257.cpp index 538633ecabb0..d35a4dd84e0e 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToCP1257.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToCP1257.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToCP1257.h" //---------------------------------------------------------------------- @@ -50,12 +51,12 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToCP1257 [implementation] - -nsUnicodeToCP1257::nsUnicodeToCP1257() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToCP1257Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToCP1257.h b/intl/uconv/ucvlatin/nsUnicodeToCP1257.h index d7b49600e23d..5e1bf3b1b6f0 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToCP1257.h +++ b/intl/uconv/ucvlatin/nsUnicodeToCP1257.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToCP1257_h___ #define nsUnicodeToCP1257_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToCP1257 [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to CP1257. @@ -50,15 +47,8 @@ * @created 20/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToCP1257 : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToCP1257(); - -}; +NS_METHOD +nsUnicodeToCP1257Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToCP1257_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToCP1258.cpp b/intl/uconv/ucvlatin/nsUnicodeToCP1258.cpp index c95d4b0cd629..5abae380e204 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToCP1258.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToCP1258.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToCP1258.h" //---------------------------------------------------------------------- @@ -50,12 +51,12 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToCP1258 [implementation] - -nsUnicodeToCP1258::nsUnicodeToCP1258() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToCP1258Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToCP1258.h b/intl/uconv/ucvlatin/nsUnicodeToCP1258.h index 013d22e0cb8d..9d83ca95c2ff 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToCP1258.h +++ b/intl/uconv/ucvlatin/nsUnicodeToCP1258.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToCP1258_h___ #define nsUnicodeToCP1258_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToCP1258 [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to CP1258. @@ -50,15 +47,8 @@ * @created 4/26/1999 * @author Frank Tang [ftang] */ -class nsUnicodeToCP1258 : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToCP1258(); - -}; +NS_METHOD +nsUnicodeToCP1258Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToCP1258_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToCP866.cpp b/intl/uconv/ucvlatin/nsUnicodeToCP866.cpp index 4c48ed431394..206005b7187b 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToCP866.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToCP866.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToCP866.h" //---------------------------------------------------------------------- @@ -50,12 +51,12 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToCP866 [implementation] - -nsUnicodeToCP866::nsUnicodeToCP866() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToCP866Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToCP866.h b/intl/uconv/ucvlatin/nsUnicodeToCP866.h index 87dba556e768..2099125ca059 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToCP866.h +++ b/intl/uconv/ucvlatin/nsUnicodeToCP866.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToCP866_h___ #define nsUnicodeToCP866_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToCP866 [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to CP866. @@ -50,15 +47,8 @@ * @created 20/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToCP866 : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToCP866(); - -}; +NS_METHOD +nsUnicodeToCP866Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToCP866_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToCP874.cpp b/intl/uconv/ucvlatin/nsUnicodeToCP874.cpp index 14037bef127b..2129146d15d3 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToCP874.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToCP874.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToCP874.h" //---------------------------------------------------------------------- @@ -50,11 +51,11 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToCP874 [implementation] - -nsUnicodeToCP874::nsUnicodeToCP874() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToCP874Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToCP874.h b/intl/uconv/ucvlatin/nsUnicodeToCP874.h index 8aa5f62dc4f0..e604ae90dd88 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToCP874.h +++ b/intl/uconv/ucvlatin/nsUnicodeToCP874.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToCP874_h___ #define nsUnicodeToCP874_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToCP874 [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to CP874. @@ -50,15 +47,8 @@ * @created 4/26/1999 * @author Frank Tang [ftang] */ -class nsUnicodeToCP874 : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToCP874(); - -}; +NS_METHOD +nsUnicodeToCP874Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToCP874_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToGEOSTD8.cpp b/intl/uconv/ucvlatin/nsUnicodeToGEOSTD8.cpp index 4b3e6985d976..e65c3374de2f 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToGEOSTD8.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToGEOSTD8.cpp @@ -20,6 +20,7 @@ * Contributor(s): */ +#include "nsUCConstructors.h" #include "nsUnicodeToGEOSTD8.h" //---------------------------------------------------------------------- @@ -34,11 +35,11 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToGEOSTD8 [implementation] - -nsUnicodeToGEOSTD8::nsUnicodeToGEOSTD8() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToGEOSTD8Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToGEOSTD8.h b/intl/uconv/ucvlatin/nsUnicodeToGEOSTD8.h index 93795845b273..ba8247cbbdf2 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToGEOSTD8.h +++ b/intl/uconv/ucvlatin/nsUnicodeToGEOSTD8.h @@ -23,24 +23,14 @@ #ifndef nsUnicodeToGEOSTD8_h___ #define nsUnicodeToGEOSTD8_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToGEOSTD8 [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to GEOSTD8. * */ -class nsUnicodeToGEOSTD8 : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToGEOSTD8(); - -}; +NS_METHOD +nsUnicodeToGEOSTD8Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToGEOSTD8_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToISO885910.cpp b/intl/uconv/ucvlatin/nsUnicodeToISO885910.cpp index 1eae3a5b88f8..461606e7cf13 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToISO885910.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToISO885910.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToISO885910.h" //---------------------------------------------------------------------- @@ -50,12 +51,12 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToISO885910 [implementation] - -nsUnicodeToISO885910::nsUnicodeToISO885910() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToISO885910Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToISO885910.h b/intl/uconv/ucvlatin/nsUnicodeToISO885910.h index 9010170e286c..19945f28c710 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToISO885910.h +++ b/intl/uconv/ucvlatin/nsUnicodeToISO885910.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToISO885910_h___ #define nsUnicodeToISO885910_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToISO885910 [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to ISO885910. @@ -50,15 +47,8 @@ * @created 17/Feb/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToISO885910 : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToISO885910(); - -}; +NS_METHOD +nsUnicodeToISO885910Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToISO885910_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToISO885913.cpp b/intl/uconv/ucvlatin/nsUnicodeToISO885913.cpp index b88e9ab7f7dd..9737bc21603c 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToISO885913.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToISO885913.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToISO885913.h" //---------------------------------------------------------------------- @@ -50,11 +51,11 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToISO885913 [implementation] - -nsUnicodeToISO885913::nsUnicodeToISO885913() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToISO885913Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToISO885913.h b/intl/uconv/ucvlatin/nsUnicodeToISO885913.h index 8f5532b85aee..ef9a7100355a 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToISO885913.h +++ b/intl/uconv/ucvlatin/nsUnicodeToISO885913.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToISO885913_h___ #define nsUnicodeToISO885913_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToISO885913 [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to ISO885913. @@ -50,15 +47,8 @@ * @created 05/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToISO885913 : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToISO885913(); - -}; +NS_METHOD +nsUnicodeToISO885913Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToISO885913_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToISO885914.cpp b/intl/uconv/ucvlatin/nsUnicodeToISO885914.cpp index 9fe7e10ce2b6..c521c3bfb9b1 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToISO885914.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToISO885914.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToISO885914.h" //---------------------------------------------------------------------- @@ -50,12 +51,12 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToISO885914 [implementation] - -nsUnicodeToISO885914::nsUnicodeToISO885914() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToISO885914Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToISO885914.h b/intl/uconv/ucvlatin/nsUnicodeToISO885914.h index 253407185b1e..a9121f281e8b 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToISO885914.h +++ b/intl/uconv/ucvlatin/nsUnicodeToISO885914.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToISO885914_h___ #define nsUnicodeToISO885914_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToISO885914 [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to ISO885914. @@ -50,15 +47,8 @@ * @created 4/26/1999 * @author Frank Tang [ftang] */ -class nsUnicodeToISO885914 : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToISO885914(); - -}; +NS_METHOD +nsUnicodeToISO885914Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToISO885914_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToISO885915.cpp b/intl/uconv/ucvlatin/nsUnicodeToISO885915.cpp index f823128c5f18..1c1e15579659 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToISO885915.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToISO885915.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToISO885915.h" //---------------------------------------------------------------------- @@ -50,12 +51,12 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToISO885915 [implementation] - -nsUnicodeToISO885915::nsUnicodeToISO885915() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToISO885915Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToISO885915.h b/intl/uconv/ucvlatin/nsUnicodeToISO885915.h index 54f2d6b01abb..947c1c123ae1 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToISO885915.h +++ b/intl/uconv/ucvlatin/nsUnicodeToISO885915.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToISO885915_h___ #define nsUnicodeToISO885915_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToISO885915 [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to ISO885915. @@ -50,15 +47,8 @@ * @created 4/26/1999 * @author Frank Tang [ftang] */ -class nsUnicodeToISO885915 : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToISO885915(); - -}; +NS_METHOD +nsUnicodeToISO885915Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToISO885915_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToISO885916.cpp b/intl/uconv/ucvlatin/nsUnicodeToISO885916.cpp index 97e3eee991ce..f649e532a322 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToISO885916.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToISO885916.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToISO885916.h" //---------------------------------------------------------------------- @@ -50,12 +51,12 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToISO885916 [implementation] - -nsUnicodeToISO885916::nsUnicodeToISO885916() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToISO885916Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToISO885916.h b/intl/uconv/ucvlatin/nsUnicodeToISO885916.h index a86533599b74..5fa67f891f45 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToISO885916.h +++ b/intl/uconv/ucvlatin/nsUnicodeToISO885916.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToISO885916_h___ #define nsUnicodeToISO885916_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToISO885916 [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to ISO885916. @@ -50,15 +47,8 @@ * @created 4/26/1999 * @author Frank Tang [ftang] */ -class nsUnicodeToISO885916 : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToISO885916(); - -}; +NS_METHOD +nsUnicodeToISO885916Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToISO885916_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToISO88592.cpp b/intl/uconv/ucvlatin/nsUnicodeToISO88592.cpp index 35e1c8700b09..3c379875d283 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToISO88592.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToISO88592.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToISO88592.h" //---------------------------------------------------------------------- @@ -50,11 +51,11 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToISO88592 [implementation] - -nsUnicodeToISO88592::nsUnicodeToISO88592() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToISO88592Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToISO88592.h b/intl/uconv/ucvlatin/nsUnicodeToISO88592.h index 862e604bf980..c8ad9eaf1ea4 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToISO88592.h +++ b/intl/uconv/ucvlatin/nsUnicodeToISO88592.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToISO88592_h___ #define nsUnicodeToISO88592_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToISO88592 [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to ISO88592. @@ -50,15 +47,8 @@ * @created 05/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToISO88592 : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToISO88592(); - -}; +NS_METHOD +nsUnicodeToISO88592Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToISO88592_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToISO88593.cpp b/intl/uconv/ucvlatin/nsUnicodeToISO88593.cpp index 9207856229e7..f2bc754101bb 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToISO88593.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToISO88593.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToISO88593.h" //---------------------------------------------------------------------- @@ -50,11 +51,11 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToISO88593 [implementation] - -nsUnicodeToISO88593::nsUnicodeToISO88593() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToISO88593Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToISO88593.h b/intl/uconv/ucvlatin/nsUnicodeToISO88593.h index baf6281a3b56..eb105a143329 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToISO88593.h +++ b/intl/uconv/ucvlatin/nsUnicodeToISO88593.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToISO88593_h___ #define nsUnicodeToISO88593_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToISO88593 [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to ISO88593. @@ -50,15 +47,8 @@ * @created 20/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToISO88593 : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToISO88593(); - -}; +NS_METHOD +nsUnicodeToISO88593Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToISO88593_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToISO88594.cpp b/intl/uconv/ucvlatin/nsUnicodeToISO88594.cpp index cedd9b1e46b1..89e879764a02 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToISO88594.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToISO88594.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToISO88594.h" //---------------------------------------------------------------------- @@ -50,12 +51,12 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToISO88594 [implementation] - -nsUnicodeToISO88594::nsUnicodeToISO88594() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToISO88594Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToISO88594.h b/intl/uconv/ucvlatin/nsUnicodeToISO88594.h index 87aa019e8999..6882741281ff 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToISO88594.h +++ b/intl/uconv/ucvlatin/nsUnicodeToISO88594.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToISO88594_h___ #define nsUnicodeToISO88594_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToISO88594 [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to ISO88594. @@ -50,15 +47,8 @@ * @created 20/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToISO88594 : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToISO88594(); - -}; +NS_METHOD +nsUnicodeToISO88594Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToISO88594_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToISO88595.cpp b/intl/uconv/ucvlatin/nsUnicodeToISO88595.cpp index a66e7b4dc0bd..5e2c32e0c2d1 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToISO88595.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToISO88595.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToISO88595.h" //---------------------------------------------------------------------- @@ -50,12 +51,12 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToISO88595 [implementation] - -nsUnicodeToISO88595::nsUnicodeToISO88595() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToISO88595Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToISO88595.h b/intl/uconv/ucvlatin/nsUnicodeToISO88595.h index 9b665a8c5a94..98216041061c 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToISO88595.h +++ b/intl/uconv/ucvlatin/nsUnicodeToISO88595.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToISO88595_h___ #define nsUnicodeToISO88595_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToISO88595 [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to ISO88595. @@ -50,15 +47,8 @@ * @created 20/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToISO88595 : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToISO88595(); - -}; +NS_METHOD +nsUnicodeToISO88595Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToISO88595_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToISO88596.cpp b/intl/uconv/ucvlatin/nsUnicodeToISO88596.cpp index 9fd28f98b868..7ba640db187c 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToISO88596.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToISO88596.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToISO88596.h" //---------------------------------------------------------------------- @@ -50,11 +51,11 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToISO88596 [implementation] - -nsUnicodeToISO88596::nsUnicodeToISO88596() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToISO88596Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToISO88596.h b/intl/uconv/ucvlatin/nsUnicodeToISO88596.h index 83e05802967c..b049147f1769 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToISO88596.h +++ b/intl/uconv/ucvlatin/nsUnicodeToISO88596.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToISO88596_h___ #define nsUnicodeToISO88596_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToISO88596 [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to ISO88596. @@ -50,15 +47,8 @@ * @created 20/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToISO88596 : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToISO88596(); - -}; +NS_METHOD +nsUnicodeToISO88596Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToISO88596_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToISO88596E.cpp b/intl/uconv/ucvlatin/nsUnicodeToISO88596E.cpp index a26aba9e1111..84bb9f59f966 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToISO88596E.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToISO88596E.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToISO88596.h" #include "nsUnicodeToISO88596E.h" @@ -43,11 +44,10 @@ // Global functions and data [declaration] -//---------------------------------------------------------------------- -// Class nsUnicodeToISO88596E [implementation] - -nsUnicodeToISO88596E::nsUnicodeToISO88596E() -: nsUnicodeToISO88596() +NS_METHOD +nsUnicodeToISO88596EConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return nsUnicodeToISO88596Constructor(aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToISO88596E.h b/intl/uconv/ucvlatin/nsUnicodeToISO88596E.h index 0ce0e6c0ac98..f6842cd2a1b2 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToISO88596E.h +++ b/intl/uconv/ucvlatin/nsUnicodeToISO88596E.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToISO88596E_h___ #define nsUnicodeToISO88596E_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToISO88596E [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to ISO88596E. @@ -50,14 +47,7 @@ * @created 20/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToISO88596E : public nsUnicodeToISO88596 -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToISO88596E(); -}; - +NS_METHOD +nsUnicodeToISO88596EConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToISO88596E_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToISO88596I.cpp b/intl/uconv/ucvlatin/nsUnicodeToISO88596I.cpp index 00c3f8c9beb5..49e44016a927 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToISO88596I.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToISO88596I.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToISO88596.h" #include "nsUnicodeToISO88596I.h" @@ -43,11 +44,10 @@ // Global functions and data [declaration] -//---------------------------------------------------------------------- -// Class nsUnicodeToISO88596I [implementation] - -nsUnicodeToISO88596I::nsUnicodeToISO88596I() -: nsUnicodeToISO88596() +NS_METHOD +nsUnicodeToISO88596IConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return nsUnicodeToISO88596Constructor(aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToISO88596I.h b/intl/uconv/ucvlatin/nsUnicodeToISO88596I.h index 0b2e05875746..042798242d1b 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToISO88596I.h +++ b/intl/uconv/ucvlatin/nsUnicodeToISO88596I.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToISO88596I_h___ #define nsUnicodeToISO88596I_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToISO88596I [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to ISO88596I. @@ -50,14 +47,7 @@ * @created 20/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToISO88596I : public nsUnicodeToISO88596 -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToISO88596I(); -}; - +NS_METHOD +nsUnicodeToISO88596IConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToISO88596I_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToISO88597.cpp b/intl/uconv/ucvlatin/nsUnicodeToISO88597.cpp index 101ca1cda993..22a40ffe4555 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToISO88597.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToISO88597.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToISO88597.h" //---------------------------------------------------------------------- @@ -50,12 +51,12 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToISO88597 [implementation] - -nsUnicodeToISO88597::nsUnicodeToISO88597() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToISO88597Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToISO88597.h b/intl/uconv/ucvlatin/nsUnicodeToISO88597.h index 91aa8943ca8f..63a67bcffdba 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToISO88597.h +++ b/intl/uconv/ucvlatin/nsUnicodeToISO88597.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToISO88597_h___ #define nsUnicodeToISO88597_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToISO88597 [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to ISO88597. @@ -50,15 +47,8 @@ * @created 17/Feb/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToISO88597 : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToISO88597(); - -}; +NS_METHOD +nsUnicodeToISO88597Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToISO88597_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToISO88598.cpp b/intl/uconv/ucvlatin/nsUnicodeToISO88598.cpp index 3a861401b2ef..cfc7791ef090 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToISO88598.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToISO88598.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToISO88598.h" //---------------------------------------------------------------------- @@ -50,12 +51,12 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToISO88598 [implementation] - -nsUnicodeToISO88598::nsUnicodeToISO88598() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToISO88598Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToISO88598.h b/intl/uconv/ucvlatin/nsUnicodeToISO88598.h index 35656cabc7fc..e6cf49b2db34 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToISO88598.h +++ b/intl/uconv/ucvlatin/nsUnicodeToISO88598.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToISO88598_h___ #define nsUnicodeToISO88598_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToISO88598 [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to ISO88598. @@ -50,15 +47,8 @@ * @created 20/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToISO88598 : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToISO88598(); - -}; +NS_METHOD +nsUnicodeToISO88598Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToISO88598_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToISO88598E.cpp b/intl/uconv/ucvlatin/nsUnicodeToISO88598E.cpp index 3de2e629cb1b..d6d4d6865ca6 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToISO88598E.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToISO88598E.cpp @@ -36,17 +36,17 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToISO88598.h" #include "nsUnicodeToISO88598E.h" //---------------------------------------------------------------------- // Global functions and data [declaration] -//---------------------------------------------------------------------- -// Class nsUnicodeToISO88598E [implementation] - -nsUnicodeToISO88598E::nsUnicodeToISO88598E() -: nsUnicodeToISO88598() +NS_METHOD +nsUnicodeToISO88598EConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return nsUnicodeToISO88598Constructor(aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToISO88598E.h b/intl/uconv/ucvlatin/nsUnicodeToISO88598E.h index d3329e541fee..52b1c07fcc11 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToISO88598E.h +++ b/intl/uconv/ucvlatin/nsUnicodeToISO88598E.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToISO88598E_h___ #define nsUnicodeToISO88598E_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToISO88598E [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to ISO88598E. @@ -50,15 +47,8 @@ * @created 20/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToISO88598E : public nsUnicodeToISO88598 -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToISO88598E(); - -}; +NS_METHOD +nsUnicodeToISO88598EConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToISO88598E_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToISO88598I.cpp b/intl/uconv/ucvlatin/nsUnicodeToISO88598I.cpp index 4076bc403085..5d7c7dcd2f67 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToISO88598I.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToISO88598I.cpp @@ -36,17 +36,17 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToISO88598.h" #include "nsUnicodeToISO88598I.h" //---------------------------------------------------------------------- // Global functions and data [declaration] -//---------------------------------------------------------------------- -// Class nsUnicodeToISO88598I [implementation] - -nsUnicodeToISO88598I::nsUnicodeToISO88598I() -: nsUnicodeToISO88598() +NS_METHOD +nsUnicodeToISO88598IConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return nsUnicodeToISO88598Constructor(aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToISO88598I.h b/intl/uconv/ucvlatin/nsUnicodeToISO88598I.h index 4b375b85c8df..74c7ddfc3b9d 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToISO88598I.h +++ b/intl/uconv/ucvlatin/nsUnicodeToISO88598I.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToISO88598I_h___ #define nsUnicodeToISO88598I_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToISO88598I [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to ISO88598I. @@ -50,15 +47,8 @@ * @created 20/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToISO88598I : public nsUnicodeToISO88598 -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToISO88598I(); - -}; +NS_METHOD +nsUnicodeToISO88598IConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToISO88598I_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToISO88599.cpp b/intl/uconv/ucvlatin/nsUnicodeToISO88599.cpp index 60625c488fcf..d36ab179fe81 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToISO88599.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToISO88599.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToISO88599.h" //---------------------------------------------------------------------- @@ -50,11 +51,11 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToISO88599 [implementation] - -nsUnicodeToISO88599::nsUnicodeToISO88599() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToISO88599Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToISO88599.h b/intl/uconv/ucvlatin/nsUnicodeToISO88599.h index 218da7894c68..f240a8ba70a3 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToISO88599.h +++ b/intl/uconv/ucvlatin/nsUnicodeToISO88599.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToISO88599_h___ #define nsUnicodeToISO88599_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToISO88599 [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to ISO88599. @@ -50,15 +47,8 @@ * @created 05/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToISO88599 : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToISO88599(); - -}; +NS_METHOD +nsUnicodeToISO88599Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToISO88599_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToISOIR111.cpp b/intl/uconv/ucvlatin/nsUnicodeToISOIR111.cpp index cf49caa44fef..adb9cafd6719 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToISOIR111.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToISOIR111.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToISOIR111.h" //---------------------------------------------------------------------- @@ -50,11 +51,11 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToISOIR111 [implementation] - -nsUnicodeToISOIR111::nsUnicodeToISOIR111() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToISOIR111Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToISOIR111.h b/intl/uconv/ucvlatin/nsUnicodeToISOIR111.h index 9244a0ef4b4f..649ba48497a7 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToISOIR111.h +++ b/intl/uconv/ucvlatin/nsUnicodeToISOIR111.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToISOIR111_h___ #define nsUnicodeToISOIR111_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToISOIR111 [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to ISOIR111. @@ -50,15 +47,8 @@ * @created 17/Feb/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToISOIR111 : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToISOIR111(); - -}; +NS_METHOD +nsUnicodeToISOIR111Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToISOIR111_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToKOI8R.cpp b/intl/uconv/ucvlatin/nsUnicodeToKOI8R.cpp index be56292c9ff6..82b66d80f52b 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToKOI8R.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToKOI8R.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToKOI8R.h" //---------------------------------------------------------------------- @@ -50,11 +51,11 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToKOI8R [implementation] - -nsUnicodeToKOI8R::nsUnicodeToKOI8R() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToKOI8RConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToKOI8R.h b/intl/uconv/ucvlatin/nsUnicodeToKOI8R.h index f52c78fdf513..e9971e3836f7 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToKOI8R.h +++ b/intl/uconv/ucvlatin/nsUnicodeToKOI8R.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToKOI8R_h___ #define nsUnicodeToKOI8R_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToKOI8R [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to KOI8R. @@ -50,15 +47,8 @@ * @created 4/26/1999 * @author Frank Tang [ftang] */ -class nsUnicodeToKOI8R : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToKOI8R(); - -}; +NS_METHOD +nsUnicodeToKOI8RConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToKOI8R_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToKOI8U.cpp b/intl/uconv/ucvlatin/nsUnicodeToKOI8U.cpp index 05abaf6dba9d..feac1b592e73 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToKOI8U.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToKOI8U.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToKOI8U.h" //---------------------------------------------------------------------- @@ -50,12 +51,12 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToKOI8U [implementation] - -nsUnicodeToKOI8U::nsUnicodeToKOI8U() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToKOI8UConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToKOI8U.h b/intl/uconv/ucvlatin/nsUnicodeToKOI8U.h index 903edbaef998..a0ce18e60e1b 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToKOI8U.h +++ b/intl/uconv/ucvlatin/nsUnicodeToKOI8U.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToKOI8U_h___ #define nsUnicodeToKOI8U_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToKOI8U [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to KOI8U. @@ -50,15 +47,8 @@ * @created 4/26/1999 * @author Frank Tang [ftang] */ -class nsUnicodeToKOI8U : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToKOI8U(); - -}; +NS_METHOD +nsUnicodeToKOI8UConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToKOI8U_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToLangBoxArabic8.cpp b/intl/uconv/ucvlatin/nsUnicodeToLangBoxArabic8.cpp index d724452b2913..dad8de520d44 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToLangBoxArabic8.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToLangBoxArabic8.cpp @@ -37,9 +37,10 @@ * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToLangBoxArabic8.h" -#include "nsUCSupport.h" +#include "nsISupports.h" //---------------------------------------------------------------------- // Class nsUnicodeToLangBoxArabic8 [declaration] diff --git a/intl/uconv/ucvlatin/nsUnicodeToMUTF7.cpp b/intl/uconv/ucvlatin/nsUnicodeToMUTF7.cpp index 4b8f01a9ae6b..30d2ddeea27b 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToMUTF7.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToMUTF7.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToMUTF7.h" //---------------------------------------------------------------------- diff --git a/intl/uconv/ucvlatin/nsUnicodeToMacArabic.cpp b/intl/uconv/ucvlatin/nsUnicodeToMacArabic.cpp index de4d35c7969c..8b53747381b9 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToMacArabic.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToMacArabic.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToMacArabic.h" //---------------------------------------------------------------------- @@ -50,11 +51,11 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToMacArabic [implementation] - -nsUnicodeToMacArabic::nsUnicodeToMacArabic() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToMacArabicConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToMacArabic.h b/intl/uconv/ucvlatin/nsUnicodeToMacArabic.h index 671b1dcd6c10..fcd839b5f4a9 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToMacArabic.h +++ b/intl/uconv/ucvlatin/nsUnicodeToMacArabic.h @@ -39,23 +39,13 @@ #ifndef nsUnicodeToMacArabic_h___ #define nsUnicodeToMacArabic_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToMacArabic [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to MacArabic. */ -class nsUnicodeToMacArabic : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToMacArabic(); - -}; +NS_METHOD +nsUnicodeToMacArabicConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToMacArabic_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToMacCE.cpp b/intl/uconv/ucvlatin/nsUnicodeToMacCE.cpp index 9fb57d4808aa..90d11c7a0e07 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToMacCE.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToMacCE.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToMacCE.h" //---------------------------------------------------------------------- @@ -50,12 +51,12 @@ static const PRInt16 g_MacCEShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToMacCE [implementation] - -nsUnicodeToMacCE::nsUnicodeToMacCE() -: nsTableEncoderSupport((uShiftTable*) &g_MacCEShiftTable, - (uMappingTable*) &g_MacCEMappingTable, 1) +NS_METHOD +nsUnicodeToMacCEConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_MacCEShiftTable, + (uMappingTable*) &g_MacCEMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToMacCE.h b/intl/uconv/ucvlatin/nsUnicodeToMacCE.h index 86fef16af963..4b2bbb873b13 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToMacCE.h +++ b/intl/uconv/ucvlatin/nsUnicodeToMacCE.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToMacCE_h___ #define nsUnicodeToMacCE_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToMacCE [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to MacCE. @@ -50,15 +47,8 @@ * @created 17/Feb/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToMacCE : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToMacCE(); - -}; +NS_METHOD +nsUnicodeToMacCEConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToMacCE_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToMacCroatian.cpp b/intl/uconv/ucvlatin/nsUnicodeToMacCroatian.cpp index 11bc83957d53..8257b51aeaf6 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToMacCroatian.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToMacCroatian.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToMacCroatian.h" //---------------------------------------------------------------------- @@ -50,12 +51,12 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToMacCroatian [implementation] - -nsUnicodeToMacCroatian::nsUnicodeToMacCroatian() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToMacCroatianConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToMacCroatian.h b/intl/uconv/ucvlatin/nsUnicodeToMacCroatian.h index 27da04de4c2f..734135190313 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToMacCroatian.h +++ b/intl/uconv/ucvlatin/nsUnicodeToMacCroatian.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToMacCroatian_h___ #define nsUnicodeToMacCroatian_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToMacCroatian [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to MacCroatian. @@ -50,15 +47,8 @@ * @created 4/26/1999 * @author Frank Tang [ftang] */ -class nsUnicodeToMacCroatian : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToMacCroatian(); - -}; +NS_METHOD +nsUnicodeToMacCroatianConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToMacCroatian_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToMacCyrillic.cpp b/intl/uconv/ucvlatin/nsUnicodeToMacCyrillic.cpp index aefd3b33dd67..b2ec5a3c316b 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToMacCyrillic.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToMacCyrillic.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToMacCyrillic.h" //---------------------------------------------------------------------- @@ -50,11 +51,11 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToMacCyrillic [implementation] - -nsUnicodeToMacCyrillic::nsUnicodeToMacCyrillic() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToMacCyrillicConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToMacCyrillic.h b/intl/uconv/ucvlatin/nsUnicodeToMacCyrillic.h index a74232230368..4a11da00a198 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToMacCyrillic.h +++ b/intl/uconv/ucvlatin/nsUnicodeToMacCyrillic.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToMacCyrillic_h___ #define nsUnicodeToMacCyrillic_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToMacCyrillic [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to MacCyrillic. @@ -50,15 +47,8 @@ * @created 4/26/1999 * @author Frank Tang [ftang] */ -class nsUnicodeToMacCyrillic : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToMacCyrillic(); - -}; +NS_METHOD +nsUnicodeToMacCyrillicConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToMacCyrillic_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToMacDevanagari.cpp b/intl/uconv/ucvlatin/nsUnicodeToMacDevanagari.cpp index a4fb74d40497..35289cf039b0 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToMacDevanagari.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToMacDevanagari.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToMacDevanagari.h" //---------------------------------------------------------------------- @@ -50,11 +51,11 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToMacDevanagari [implementation] - -nsUnicodeToMacDevanagari::nsUnicodeToMacDevanagari() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToMacDevanagariConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToMacDevanagari.h b/intl/uconv/ucvlatin/nsUnicodeToMacDevanagari.h index 42f621dd0ba7..8db29ae69633 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToMacDevanagari.h +++ b/intl/uconv/ucvlatin/nsUnicodeToMacDevanagari.h @@ -39,23 +39,13 @@ #ifndef nsUnicodeToMacDevanagari_h___ #define nsUnicodeToMacDevanagari_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToMacDevanagari [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to MacDevanagari. */ -class nsUnicodeToMacDevanagari : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToMacDevanagari(); - -}; +NS_METHOD +nsUnicodeToMacDevanagariConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToMacDevanagari_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToMacFarsi.cpp b/intl/uconv/ucvlatin/nsUnicodeToMacFarsi.cpp index 5014a7103ed2..b4be5056b1cd 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToMacFarsi.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToMacFarsi.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToMacFarsi.h" //---------------------------------------------------------------------- @@ -50,11 +51,11 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToMacFarsi [implementation] - -nsUnicodeToMacFarsi::nsUnicodeToMacFarsi() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToMacFarsiConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToMacFarsi.h b/intl/uconv/ucvlatin/nsUnicodeToMacFarsi.h index f39aaeac72b1..8075d2497bb6 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToMacFarsi.h +++ b/intl/uconv/ucvlatin/nsUnicodeToMacFarsi.h @@ -39,23 +39,13 @@ #ifndef nsUnicodeToMacFarsi_h___ #define nsUnicodeToMacFarsi_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToMacFarsi [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to MacFarsi. */ -class nsUnicodeToMacFarsi : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToMacFarsi(); - -}; +NS_METHOD +nsUnicodeToMacFarsiConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToMacFarsi_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToMacGreek.cpp b/intl/uconv/ucvlatin/nsUnicodeToMacGreek.cpp index 207710e8e74f..9438fcaec7c4 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToMacGreek.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToMacGreek.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToMacGreek.h" //---------------------------------------------------------------------- @@ -50,11 +51,11 @@ static const PRInt16 g_MacGreekShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToMacGreek [implementation] - -nsUnicodeToMacGreek::nsUnicodeToMacGreek() -: nsTableEncoderSupport((uShiftTable*) &g_MacGreekShiftTable, - (uMappingTable*) &g_MacGreekMappingTable, 1) +NS_METHOD +nsUnicodeToMacGreekConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_MacGreekShiftTable, + (uMappingTable*) &g_MacGreekMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToMacGreek.h b/intl/uconv/ucvlatin/nsUnicodeToMacGreek.h index 6ba8e2dcea78..6a68407a39c6 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToMacGreek.h +++ b/intl/uconv/ucvlatin/nsUnicodeToMacGreek.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToMacGreek_h___ #define nsUnicodeToMacGreek_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToMacGreek [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to MacGreek. @@ -50,15 +47,8 @@ * @created 05/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToMacGreek : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToMacGreek(); - -}; +NS_METHOD +nsUnicodeToMacGreekConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToMacGreek_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToMacGujarati.cpp b/intl/uconv/ucvlatin/nsUnicodeToMacGujarati.cpp index 38e67a565308..2726fb54d9af 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToMacGujarati.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToMacGujarati.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToMacGujarati.h" //---------------------------------------------------------------------- @@ -50,11 +51,11 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToMacGujarati [implementation] - -nsUnicodeToMacGujarati::nsUnicodeToMacGujarati() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToMacGujaratiConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToMacGujarati.h b/intl/uconv/ucvlatin/nsUnicodeToMacGujarati.h index 18336ddd1acb..79b8ecb0567f 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToMacGujarati.h +++ b/intl/uconv/ucvlatin/nsUnicodeToMacGujarati.h @@ -39,23 +39,13 @@ #ifndef nsUnicodeToMacGujarati_h___ #define nsUnicodeToMacGujarati_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToMacGujarati [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to MacGujarati. */ -class nsUnicodeToMacGujarati : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToMacGujarati(); - -}; +NS_METHOD +nsUnicodeToMacGujaratiConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToMacGujarati_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToMacGurmukhi.cpp b/intl/uconv/ucvlatin/nsUnicodeToMacGurmukhi.cpp index fb2df23bf5be..59f5ba88ae26 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToMacGurmukhi.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToMacGurmukhi.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToMacGurmukhi.h" //---------------------------------------------------------------------- @@ -50,12 +51,12 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToMacGurmukhi [implementation] - -nsUnicodeToMacGurmukhi::nsUnicodeToMacGurmukhi() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToMacGurmukhiConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToMacGurmukhi.h b/intl/uconv/ucvlatin/nsUnicodeToMacGurmukhi.h index 93f5b1972f35..84b5735403ba 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToMacGurmukhi.h +++ b/intl/uconv/ucvlatin/nsUnicodeToMacGurmukhi.h @@ -39,23 +39,13 @@ #ifndef nsUnicodeToMacGurmukhi_h___ #define nsUnicodeToMacGurmukhi_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToMacGurmukhi [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to MacGurmukhi. */ -class nsUnicodeToMacGurmukhi : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToMacGurmukhi(); - -}; +NS_METHOD +nsUnicodeToMacGurmukhiConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToMacGurmukhi_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToMacHebrew.cpp b/intl/uconv/ucvlatin/nsUnicodeToMacHebrew.cpp index 17d4a637b4c0..2beb86ffeed7 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToMacHebrew.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToMacHebrew.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToMacHebrew.h" //---------------------------------------------------------------------- @@ -50,11 +51,11 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToMacHebrew [implementation] - -nsUnicodeToMacHebrew::nsUnicodeToMacHebrew() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToMacHebrewConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToMacHebrew.h b/intl/uconv/ucvlatin/nsUnicodeToMacHebrew.h index ba59021424f5..21eb56b47ba8 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToMacHebrew.h +++ b/intl/uconv/ucvlatin/nsUnicodeToMacHebrew.h @@ -39,23 +39,13 @@ #ifndef nsUnicodeToMacHebrew_h___ #define nsUnicodeToMacHebrew_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToMacHebrew [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to MacHebrew. */ -class nsUnicodeToMacHebrew : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToMacHebrew(); - -}; +NS_METHOD +nsUnicodeToMacHebrewConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToMacHebrew_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToMacIcelandic.cpp b/intl/uconv/ucvlatin/nsUnicodeToMacIcelandic.cpp index c96fb63a9150..595cdd6dcbee 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToMacIcelandic.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToMacIcelandic.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToMacIcelandic.h" //---------------------------------------------------------------------- @@ -50,12 +51,12 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToMacIcelandic [implementation] - -nsUnicodeToMacIcelandic::nsUnicodeToMacIcelandic() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToMacIcelandicConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToMacIcelandic.h b/intl/uconv/ucvlatin/nsUnicodeToMacIcelandic.h index 103e13655949..311583116935 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToMacIcelandic.h +++ b/intl/uconv/ucvlatin/nsUnicodeToMacIcelandic.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToMacIcelandic_h___ #define nsUnicodeToMacIcelandic_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToMacIcelandic [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to MacIcelandic. @@ -50,15 +47,8 @@ * @created 4/26/1999 * @author Frank Tang [ftang] */ -class nsUnicodeToMacIcelandic : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToMacIcelandic(); - -}; +NS_METHOD +nsUnicodeToMacIcelandicConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToMacIcelandic_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToMacRomanian.cpp b/intl/uconv/ucvlatin/nsUnicodeToMacRomanian.cpp index 5acaf974b3d2..38752a50379c 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToMacRomanian.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToMacRomanian.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToMacRomanian.h" //---------------------------------------------------------------------- @@ -50,11 +51,11 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToMacRomanian [implementation] - -nsUnicodeToMacRomanian::nsUnicodeToMacRomanian() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToMacRomanianConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToMacRomanian.h b/intl/uconv/ucvlatin/nsUnicodeToMacRomanian.h index 2f371c10424e..69e80f007bc9 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToMacRomanian.h +++ b/intl/uconv/ucvlatin/nsUnicodeToMacRomanian.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToMacRomanian_h___ #define nsUnicodeToMacRomanian_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToMacRomanian [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to MacRomanian. @@ -50,15 +47,8 @@ * @created 4/26/1999 * @author Frank Tang [ftang] */ -class nsUnicodeToMacRomanian : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToMacRomanian(); - -}; +NS_METHOD +nsUnicodeToMacRomanianConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToMacRomanian_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToMacTurkish.cpp b/intl/uconv/ucvlatin/nsUnicodeToMacTurkish.cpp index 177c79e25812..7909f7c2d534 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToMacTurkish.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToMacTurkish.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToMacTurkish.h" //---------------------------------------------------------------------- @@ -50,12 +51,12 @@ static const PRInt16 g_MacTurkishShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToMacTurkish [implementation] - -nsUnicodeToMacTurkish::nsUnicodeToMacTurkish() -: nsTableEncoderSupport((uShiftTable*) &g_MacTurkishShiftTable, - (uMappingTable*) &g_MacTurkishMappingTable, 1) +NS_METHOD +nsUnicodeToMacTurkishConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_MacTurkishShiftTable, + (uMappingTable*) &g_MacTurkishMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToMacTurkish.h b/intl/uconv/ucvlatin/nsUnicodeToMacTurkish.h index d86297091ece..df74a2833422 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToMacTurkish.h +++ b/intl/uconv/ucvlatin/nsUnicodeToMacTurkish.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToMacTurkish_h___ #define nsUnicodeToMacTurkish_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToMacTurkish [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to MacTurkish. @@ -50,15 +47,8 @@ * @created 05/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToMacTurkish : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToMacTurkish(); - -}; +NS_METHOD +nsUnicodeToMacTurkishConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToMacTurkish_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToMacUkrainian.cpp b/intl/uconv/ucvlatin/nsUnicodeToMacUkrainian.cpp index 785cfc962bb9..224af42952cb 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToMacUkrainian.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToMacUkrainian.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToMacUkrainian.h" //---------------------------------------------------------------------- @@ -50,12 +51,12 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToMacUkrainian [implementation] - -nsUnicodeToMacUkrainian::nsUnicodeToMacUkrainian() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToMacUkrainianConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToMacUkrainian.h b/intl/uconv/ucvlatin/nsUnicodeToMacUkrainian.h index fd5c288b936e..30305ba82ff5 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToMacUkrainian.h +++ b/intl/uconv/ucvlatin/nsUnicodeToMacUkrainian.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToMacUkrainian_h___ #define nsUnicodeToMacUkrainian_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToMacUkrainian [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to MacUkrainian. @@ -50,15 +47,8 @@ * @created 4/26/1999 * @author Frank Tang [ftang] */ -class nsUnicodeToMacUkrainian : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToMacUkrainian(); - -}; +NS_METHOD +nsUnicodeToMacUkrainianConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToMacUkrainian_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToSymbol.cpp b/intl/uconv/ucvlatin/nsUnicodeToSymbol.cpp index 208b6b2efd10..9b94ccac1cd6 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToSymbol.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToSymbol.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToSymbol.h" //---------------------------------------------------------------------- @@ -50,11 +51,11 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToSymbol [implementation] - -nsUnicodeToSymbol::nsUnicodeToSymbol() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToSymbolConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToSymbol.h b/intl/uconv/ucvlatin/nsUnicodeToSymbol.h index f69a54418114..6e9f18ca8a5b 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToSymbol.h +++ b/intl/uconv/ucvlatin/nsUnicodeToSymbol.h @@ -39,24 +39,14 @@ #ifndef nsUnicodeToSymbol_h___ #define nsUnicodeToSymbol_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToSymbol [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to Symbol. * */ -class nsUnicodeToSymbol : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToSymbol(); - -}; +NS_METHOD +nsUnicodeToSymbolConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToSymbol_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToT61.cpp b/intl/uconv/ucvlatin/nsUnicodeToT61.cpp index 27fa75404610..00046ec30a94 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToT61.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToT61.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToT61.h" //---------------------------------------------------------------------- @@ -51,11 +52,11 @@ static const PRInt16 g_T61ShiftTable[] = { ShiftCell(u1ByteChar, 1, 0xD0, 0xFF, 0x00, 0xD0, 0x00, 0xFF), ShiftCell(u2BytesChar, 2, 0xC0, 0xCF, 0xC0, 0x41, 0xCF, 0x7A) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToT61 [implementation] - -nsUnicodeToT61::nsUnicodeToT61() -: nsTableEncoderSupport((uShiftTable*) &g_T61ShiftTable, - (uMappingTable*) &g_T61MappingTable, 2) +NS_METHOD +nsUnicodeToT61Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_T61ShiftTable, + (uMappingTable*) &g_T61MappingTable, 2, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToT61.h b/intl/uconv/ucvlatin/nsUnicodeToT61.h index fe49580068bf..c7191eefd7df 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToT61.h +++ b/intl/uconv/ucvlatin/nsUnicodeToT61.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToT61_h___ #define nsUnicodeToT61_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToT61 [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to T61. @@ -50,15 +47,8 @@ * @created 05/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToT61 : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToT61(); - -}; +NS_METHOD +nsUnicodeToT61Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToT61_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToTCVN5712.cpp b/intl/uconv/ucvlatin/nsUnicodeToTCVN5712.cpp index 8ec3c6ce0448..c3188c67d814 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToTCVN5712.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToTCVN5712.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToTCVN5712.h" //---------------------------------------------------------------------- @@ -50,11 +51,11 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToTCVN5712 [implementation] - -nsUnicodeToTCVN5712::nsUnicodeToTCVN5712() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToTCVN5712Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToTCVN5712.h b/intl/uconv/ucvlatin/nsUnicodeToTCVN5712.h index 453673f1b6d3..e1287956c78c 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToTCVN5712.h +++ b/intl/uconv/ucvlatin/nsUnicodeToTCVN5712.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToTCVN5712_h___ #define nsUnicodeToTCVN5712_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToTCVN5712 [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to TCVN5712. @@ -50,15 +47,8 @@ * @created 4/26/1999 * @author Frank Tang [ftang] */ -class nsUnicodeToTCVN5712 : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToTCVN5712(); - -}; +NS_METHOD +nsUnicodeToTCVN5712Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToTCVN5712_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToUserDefined.cpp b/intl/uconv/ucvlatin/nsUnicodeToUserDefined.cpp index 7b4b9118289b..d4cd6291fb08 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToUserDefined.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToUserDefined.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToUserDefined.h" //---------------------------------------------------------------------- @@ -50,11 +51,11 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToUserDefined [implementation] - -nsUnicodeToUserDefined::nsUnicodeToUserDefined() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToUserDefinedConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToUserDefined.h b/intl/uconv/ucvlatin/nsUnicodeToUserDefined.h index 20e37311d229..5f8e740c5d12 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToUserDefined.h +++ b/intl/uconv/ucvlatin/nsUnicodeToUserDefined.h @@ -39,25 +39,16 @@ #ifndef nsUnicodeToUserDefined_h___ #define nsUnicodeToUserDefined_h___ -#include "nsUCSupport.h" +#include "nsISupports.h" -//---------------------------------------------------------------------- -// Class nsUnicodeToUserDefined [declaration] /** * A character set converter from Unicode to UserDefined. * * @created 17/Feb/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToUserDefined : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToUserDefined(); - -}; +NS_METHOD +nsUnicodeToUserDefinedConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToUserDefined_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToVISCII.cpp b/intl/uconv/ucvlatin/nsUnicodeToVISCII.cpp index 4e1580122d73..4a1f2b0ff7c4 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToVISCII.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToVISCII.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToVISCII.h" //---------------------------------------------------------------------- @@ -50,12 +51,12 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToVISCII [implementation] - -nsUnicodeToVISCII::nsUnicodeToVISCII() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToVISCIIConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToVISCII.h b/intl/uconv/ucvlatin/nsUnicodeToVISCII.h index d4c4b5997b94..d9cad382b187 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToVISCII.h +++ b/intl/uconv/ucvlatin/nsUnicodeToVISCII.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToVISCII_h___ #define nsUnicodeToVISCII_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToVISCII [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to VISCII. @@ -50,15 +47,8 @@ * @created 4/26/1999 * @author Frank Tang [ftang] */ -class nsUnicodeToVISCII : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToVISCII(); - -}; +NS_METHOD +nsUnicodeToVISCIIConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToVISCII_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToVPS.cpp b/intl/uconv/ucvlatin/nsUnicodeToVPS.cpp index bf5fd94f22af..619d570a6e71 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToVPS.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToVPS.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToVPS.h" //---------------------------------------------------------------------- @@ -50,12 +51,12 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToVPS [implementation] - -nsUnicodeToVPS::nsUnicodeToVPS() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToVPSConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToVPS.h b/intl/uconv/ucvlatin/nsUnicodeToVPS.h index 775db9b9f748..2e85adbba744 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToVPS.h +++ b/intl/uconv/ucvlatin/nsUnicodeToVPS.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToVPS_h___ #define nsUnicodeToVPS_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToVPS [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to VPS. @@ -50,15 +47,8 @@ * @created 4/26/1999 * @author Frank Tang [ftang] */ -class nsUnicodeToVPS : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToVPS(); - -}; +NS_METHOD +nsUnicodeToVPSConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToVPS_h___ */ diff --git a/intl/uconv/ucvlatin/nsUnicodeToZapfDingbat.cpp b/intl/uconv/ucvlatin/nsUnicodeToZapfDingbat.cpp index b872eda183cb..9326f60981bd 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToZapfDingbat.cpp +++ b/intl/uconv/ucvlatin/nsUnicodeToZapfDingbat.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUnicodeToZapfDingbat.h" //---------------------------------------------------------------------- @@ -50,12 +51,12 @@ static const PRInt16 g_ufShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUnicodeToZapfDingbat [implementation] - -nsUnicodeToZapfDingbat::nsUnicodeToZapfDingbat() -: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, - (uMappingTable*) &g_ufMappingTable, 1) +NS_METHOD +nsUnicodeToZapfDingbatConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ufShiftTable, + (uMappingTable*) &g_ufMappingTable, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUnicodeToZapfDingbat.h b/intl/uconv/ucvlatin/nsUnicodeToZapfDingbat.h index 8f0408a056f7..bfb7f8e70885 100644 --- a/intl/uconv/ucvlatin/nsUnicodeToZapfDingbat.h +++ b/intl/uconv/ucvlatin/nsUnicodeToZapfDingbat.h @@ -39,24 +39,14 @@ #ifndef nsUnicodeToZapfDingbat_h___ #define nsUnicodeToZapfDingbat_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToZapfDingbat [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to ZapfDingbat. * */ -class nsUnicodeToZapfDingbat : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToZapfDingbat(); - -}; +NS_METHOD +nsUnicodeToZapfDingbatConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToZapfDingbat_h___ */ diff --git a/intl/uconv/ucvlatin/nsUserDefinedToUnicode.cpp b/intl/uconv/ucvlatin/nsUserDefinedToUnicode.cpp index e593f5e463e2..7d14d0e96b55 100644 --- a/intl/uconv/ucvlatin/nsUserDefinedToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsUserDefinedToUnicode.cpp @@ -36,6 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsUCConstructors.h" #include "nsUserDefinedToUnicode.h" //---------------------------------------------------------------------- @@ -50,11 +51,11 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsUserDefinedToUnicode [implementation] - -nsUserDefinedToUnicode::nsUserDefinedToUnicode() -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsUserDefinedToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsUserDefinedToUnicode.h b/intl/uconv/ucvlatin/nsUserDefinedToUnicode.h index eb6cf1bccffa..7a57bac92877 100644 --- a/intl/uconv/ucvlatin/nsUserDefinedToUnicode.h +++ b/intl/uconv/ucvlatin/nsUserDefinedToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsUserDefinedToUnicode_h___ #define nsUserDefinedToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUserDefinedToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from UserDefined to Unicode. @@ -50,15 +47,8 @@ * @created 23/Nov/1998 * @author Catalin Rotaru [CATA] */ -class nsUserDefinedToUnicode : public nsOneByteDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUserDefinedToUnicode(); - -}; +NS_METHOD +nsUserDefinedToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUserDefinedToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsVISCIIToUnicode.cpp b/intl/uconv/ucvlatin/nsVISCIIToUnicode.cpp index 8a69feb18439..40ad39df2b35 100644 --- a/intl/uconv/ucvlatin/nsVISCIIToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsVISCIIToUnicode.cpp @@ -37,6 +37,7 @@ * ***** END LICENSE BLOCK ***** */ #include "nsVISCIIToUnicode.h" +#include "nsUCConstructors.h" //---------------------------------------------------------------------- // Global functions and data [declaration] @@ -50,11 +51,11 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsVISCIIToUnicode [implementation] - -nsVISCIIToUnicode::nsVISCIIToUnicode() -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsVISCIIToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsVISCIIToUnicode.h b/intl/uconv/ucvlatin/nsVISCIIToUnicode.h index 3580782c816e..e1213ce8ea2e 100644 --- a/intl/uconv/ucvlatin/nsVISCIIToUnicode.h +++ b/intl/uconv/ucvlatin/nsVISCIIToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsVISCIIToUnicode_h___ #define nsVISCIIToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsVISCIIToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from VISCII to Unicode. @@ -50,15 +47,8 @@ * @created 4/26/1999 * @author Frank Tang [ftang] */ -class nsVISCIIToUnicode : public nsOneByteDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsVISCIIToUnicode(); - -}; +NS_METHOD +nsVISCIIToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsVISCIIToUnicode_h___ */ diff --git a/intl/uconv/ucvlatin/nsVPSToUnicode.cpp b/intl/uconv/ucvlatin/nsVPSToUnicode.cpp index c043cea0edf6..2466fff35236 100644 --- a/intl/uconv/ucvlatin/nsVPSToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsVPSToUnicode.cpp @@ -37,6 +37,7 @@ * ***** END LICENSE BLOCK ***** */ #include "nsVPSToUnicode.h" +#include "nsUCConstructors.h" //---------------------------------------------------------------------- // Global functions and data [declaration] @@ -50,12 +51,12 @@ static const PRInt16 g_utShiftTable[] = { ShiftCell(0,0,0,0,0,0,0,0) }; -//---------------------------------------------------------------------- -// Class nsVPSToUnicode [implementation] - -nsVPSToUnicode::nsVPSToUnicode() -: nsOneByteDecoderSupport((uShiftTable*) &g_utShiftTable, - (uMappingTable*) &g_utMappingTable) +NS_METHOD +nsVPSToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateOneByteDecoder((uShiftTable*) &g_utShiftTable, + (uMappingTable*) &g_utMappingTable, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsVPSToUnicode.h b/intl/uconv/ucvlatin/nsVPSToUnicode.h index 9e07dc2a1717..5e30d4f3f0a7 100644 --- a/intl/uconv/ucvlatin/nsVPSToUnicode.h +++ b/intl/uconv/ucvlatin/nsVPSToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsVPSToUnicode_h___ #define nsVPSToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsVPSToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from VPS to Unicode. @@ -50,15 +47,8 @@ * @created 4/26/1999 * @author Frank Tang [ftang] */ -class nsVPSToUnicode : public nsOneByteDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsVPSToUnicode(); - -}; +NS_METHOD +nsVPSToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsVPSToUnicode_h___ */ diff --git a/intl/uconv/ucvmath/nsUCvMathSupport.cpp b/intl/uconv/ucvmath/nsUCvMathSupport.cpp deleted file mode 100644 index 935c4902889d..000000000000 --- a/intl/uconv/ucvmath/nsUCvMathSupport.cpp +++ /dev/null @@ -1,736 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: NPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Netscape Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Roger B. Sidje - * - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the NPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the NPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -#include "pratom.h" -#include "nsIComponentManager.h" -#include "nsICharRepresentable.h" -#include "nsIUnicodeDecoder.h" -#include "nsIUnicodeEncoder.h" -#include "nsIUnicodeDecodeHelper.h" -#include "nsIUnicodeEncodeHelper.h" -#include "nsUCvMathSupport.h" -#include "nsUCvMathDll.h" - -static NS_DEFINE_CID(kUnicodeDecodeHelperCID, NS_UNICODEDECODEHELPER_CID); -static NS_DEFINE_CID(kUnicodeEncodeHelperCID, NS_UNICODEENCODEHELPER_CID); - -#define DEFAULT_BUFFER_CAPACITY 16 - -// XXX review the buffer growth limitation code - -//---------------------------------------------------------------------- -// Class nsBasicDecoderSupport [implementation] - -nsBasicDecoderSupport::nsBasicDecoderSupport() -{ - NS_INIT_REFCNT(); -} - -nsBasicDecoderSupport::~nsBasicDecoderSupport() -{ -} - -//---------------------------------------------------------------------- -// Interface nsISupports [implementation] - -NS_IMPL_ADDREF(nsBasicDecoderSupport); -NS_IMPL_RELEASE(nsBasicDecoderSupport); - -nsresult nsBasicDecoderSupport::QueryInterface(REFNSIID aIID, - void** aInstancePtr) -{ - if (NULL == aInstancePtr) { - return NS_ERROR_NULL_POINTER; - } - - *aInstancePtr = NULL; - - static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID); - - if (aIID.Equals(NS_GET_IID(nsIUnicodeDecoder))) { - *aInstancePtr = (void*) ((nsIUnicodeDecoder*)this); - NS_ADDREF_THIS(); - return NS_OK; - } - if (aIID.Equals(kISupportsIID)) { - *aInstancePtr = (void*) ((nsISupports*)this); - NS_ADDREF_THIS(); - return NS_OK; - } - - return NS_NOINTERFACE; -} - -//---------------------------------------------------------------------- -// Interface nsIUnicodeDecoder [implementation] - -//---------------------------------------------------------------------- -// Class nsBufferDecoderSupport [implementation] - -nsBufferDecoderSupport::nsBufferDecoderSupport() -: nsBasicDecoderSupport() -{ - mBufferCapacity = DEFAULT_BUFFER_CAPACITY; - mBuffer = new char[mBufferCapacity]; - - Reset(); -} - -nsBufferDecoderSupport::~nsBufferDecoderSupport() -{ - delete [] mBuffer; -} - -void nsBufferDecoderSupport::FillBuffer(const char ** aSrc, PRInt32 aSrcLength) -{ - PRInt32 bcr = PR_MIN(mBufferCapacity - mBufferLength, aSrcLength); - memcpy(mBuffer + mBufferLength, *aSrc, bcr); - mBufferLength += bcr; - (*aSrc) += bcr; -} - -void nsBufferDecoderSupport::DoubleBuffer() -{ - mBufferCapacity *= 2; - char * newBuffer = new char [mBufferCapacity]; - if (mBufferLength > 0) memcpy(newBuffer, mBuffer, mBufferLength); - delete [] mBuffer; - mBuffer = newBuffer; -} - -//---------------------------------------------------------------------- -// Subclassing of nsBasicDecoderSupport class [implementation] - -NS_IMETHODIMP nsBufferDecoderSupport::Convert(const char * aSrc, - PRInt32 * aSrcLength, - PRUnichar * aDest, - PRInt32 * aDestLength) -{ - // we do all operations using pointers internally - const char * src = aSrc; - const char * srcEnd = aSrc + *aSrcLength; - PRUnichar * dest = aDest; - PRUnichar * destEnd = aDest + *aDestLength; - - PRInt32 bcr, bcw; // byte counts for read & write; - nsresult res = NS_OK; - - // do we have some residual data from the last conversion? - if (mBufferLength > 0) if (dest == destEnd) { - res = NS_OK_UDEC_MOREOUTPUT; - } else for (;;) { - // we need new data to add to the buffer - if (src == srcEnd) { - res = NS_OK_UDEC_MOREINPUT; - break; - } - - // fill that buffer - PRInt32 buffLen = mBufferLength; // initial buffer length - FillBuffer(&src, srcEnd - src); - - // convert that buffer - bcr = mBufferLength; - bcw = destEnd - dest; - res = ConvertNoBuff(mBuffer, &bcr, dest, &bcw); - dest += bcw; - - if ((res == NS_OK_UDEC_MOREINPUT) && (bcw == 0)) { - res = NS_ERROR_UNEXPECTED; -#if defined(DEBUG_yokoyama) || defined(DEBUG_ftang) - NS_ASSERTION(0, "This should not happen. Internal buffer may be corrupted."); -#endif - break; - } else { - if (bcr < buffLen) { - // we didn't convert that residual data - unfill the buffer - src -= mBufferLength - buffLen; - mBufferLength = buffLen; -#if defined(DEBUG_yokoyama) || defined(DEBUG_ftang) - NS_ASSERTION(0, "This should not happen. Internal buffer may be corrupted."); -#endif - } else { - // the buffer and some extra data was converted - unget the rest - src -= mBufferLength - bcr; - mBufferLength = 0; - res = NS_OK; - } - break; - } - } - - if (res == NS_OK) { - bcr = srcEnd - src; - bcw = destEnd - dest; - res = ConvertNoBuff(src, &bcr, dest, &bcw); - src += bcr; - dest += bcw; - - // if we have partial input, store it in our internal buffer. - if (res == NS_OK_UDEC_MOREINPUT) { - bcr = srcEnd - src; - // make sure buffer is large enough - if (bcr > mBufferCapacity) { - // somehow we got into an error state and the buffer is growing out of control - res = NS_ERROR_UNEXPECTED; - } else { - FillBuffer(&src, bcr); - } - } - } - - *aSrcLength -= srcEnd - src; - *aDestLength -= destEnd - dest; - return res; -} - -NS_IMETHODIMP nsBufferDecoderSupport::Reset() -{ - mBufferLength = 0; - return NS_OK; -} - -//---------------------------------------------------------------------- -// Class nsTableDecoderSupport [implementation] - -nsTableDecoderSupport::nsTableDecoderSupport(uShiftTable * aShiftTable, - uMappingTable * aMappingTable) -: nsBufferDecoderSupport() -{ - mHelper = NULL; - mShiftTable = aShiftTable; - mMappingTable = aMappingTable; -} - -nsTableDecoderSupport::~nsTableDecoderSupport() -{ - NS_IF_RELEASE(mHelper); -} - -//---------------------------------------------------------------------- -// Subclassing of nsBufferDecoderSupport class [implementation] - -NS_IMETHODIMP nsTableDecoderSupport::ConvertNoBuff(const char * aSrc, - PRInt32 * aSrcLength, - PRUnichar * aDest, - PRInt32 * aDestLength) -{ - nsresult res; - - if (mHelper == nsnull) { - res = nsComponentManager::CreateInstance(kUnicodeDecodeHelperCID, NULL, - NS_GET_IID(nsIUnicodeDecodeHelper), (void**) & mHelper); - - if (NS_FAILED(res)) return NS_ERROR_UDEC_NOHELPER; - } - - res = mHelper->ConvertByTable(aSrc, aSrcLength, aDest, aDestLength, - mShiftTable, mMappingTable); - return res; -} - -//---------------------------------------------------------------------- -// Class nsMultiTableDecoderSupport [implementation] - -nsMultiTableDecoderSupport::nsMultiTableDecoderSupport( - PRInt32 aTableCount, - uRange * aRangeArray, - uShiftTable ** aShiftTable, - uMappingTable ** aMappingTable) -: nsBufferDecoderSupport() -{ - mHelper = NULL; - mTableCount = aTableCount; - mRangeArray = aRangeArray; - mShiftTable = aShiftTable; - mMappingTable = aMappingTable; -} - -nsMultiTableDecoderSupport::~nsMultiTableDecoderSupport() -{ - NS_IF_RELEASE(mHelper); -} - -//---------------------------------------------------------------------- -// Subclassing of nsBufferDecoderSupport class [implementation] - -NS_IMETHODIMP nsMultiTableDecoderSupport::ConvertNoBuff(const char * aSrc, - PRInt32 * aSrcLength, - PRUnichar * aDest, - PRInt32 * aDestLength) -{ - nsresult res; - - if (mHelper == nsnull) { - res = nsComponentManager::CreateInstance(kUnicodeDecodeHelperCID, NULL, - NS_GET_IID(nsIUnicodeDecodeHelper), (void**) &mHelper); - - if (NS_FAILED(res)) return NS_ERROR_UDEC_NOHELPER; - } - - res = mHelper->ConvertByMultiTable(aSrc, aSrcLength, aDest, aDestLength, - mTableCount, mRangeArray, mShiftTable, mMappingTable); - return res; -} - -//---------------------------------------------------------------------- -// Class nsOneByteDecoderSupport [implementation] - -nsOneByteDecoderSupport::nsOneByteDecoderSupport( - uShiftTable * aShiftTable, - uMappingTable * aMappingTable) -: nsBasicDecoderSupport() -{ - mHelper = NULL; - mShiftTable = aShiftTable; - mMappingTable = aMappingTable; -} - -nsOneByteDecoderSupport::~nsOneByteDecoderSupport() -{ - NS_IF_RELEASE(mHelper); -} - -//---------------------------------------------------------------------- -// Subclassing of nsBasicDecoderSupport class [implementation] - -NS_IMETHODIMP nsOneByteDecoderSupport::Convert(const char * aSrc, - PRInt32 * aSrcLength, - PRUnichar * aDest, - PRInt32 * aDestLength) -{ - nsresult res; - - if (mHelper == nsnull) { - res = nsComponentManager::CreateInstance(kUnicodeDecodeHelperCID, NULL, - NS_GET_IID(nsIUnicodeDecodeHelper), (void**) &mHelper); - if (NS_FAILED(res)) return NS_ERROR_UDEC_NOHELPER; - - res = mHelper -> CreateFastTable(mShiftTable, mMappingTable, mFastTable, - ONE_BYTE_TABLE_SIZE); - if (NS_FAILED(res)) return res; - } - - res = mHelper->ConvertByFastTable(aSrc, aSrcLength, aDest, aDestLength, - mFastTable, ONE_BYTE_TABLE_SIZE); - return res; -} - -NS_IMETHODIMP nsOneByteDecoderSupport::GetMaxLength(const char * aSrc, - PRInt32 aSrcLength, - PRInt32 * aDestLength) -{ - // single byte to Unicode converter - *aDestLength = aSrcLength; - return NS_OK_UDEC_EXACTLENGTH; -} - -NS_IMETHODIMP nsOneByteDecoderSupport::Reset() -{ - // nothing to reset, no internal state in this case - return NS_OK; -} - -//---------------------------------------------------------------------- -// Class nsBasicEncoder [implementation] -nsBasicEncoder::nsBasicEncoder() -{ - NS_INIT_REFCNT(); -} - -nsBasicEncoder::~nsBasicEncoder() -{ -} - -//---------------------------------------------------------------------- -// Interface nsISupports [implementation] - -NS_IMPL_ADDREF(nsBasicEncoder); -NS_IMPL_RELEASE(nsBasicEncoder); - -nsresult nsBasicEncoder::QueryInterface(REFNSIID aIID, - void** aInstancePtr) -{ - if (NULL == aInstancePtr) { - return NS_ERROR_NULL_POINTER; - } - - *aInstancePtr = NULL; - - static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID); - - if (aIID.Equals(kIUnicodeEncoderIID)) { - *aInstancePtr = (void*) ((nsIUnicodeEncoder*)this); - NS_ADDREF_THIS(); - return NS_OK; - } - if (aIID.Equals(NS_GET_IID(nsICharRepresentable))) { - *aInstancePtr = (void*) ((nsICharRepresentable*)this); - NS_ADDREF_THIS(); - return NS_OK; - } - if (aIID.Equals(kISupportsIID)) { - *aInstancePtr = (void*) ((nsISupports*)((nsIUnicodeEncoder*)this)); - NS_ADDREF_THIS(); - return NS_OK; - } - - return NS_NOINTERFACE; -} -//---------------------------------------------------------------------- -// Class nsEncoderSupport [implementation] - -nsEncoderSupport::nsEncoderSupport() -{ - mBufferCapacity = DEFAULT_BUFFER_CAPACITY; - mBuffer = new char[mBufferCapacity]; - - mErrBehavior = kOnError_Signal; - mErrChar = 0; - mErrEncoder = NULL; - - Reset(); -} - -nsEncoderSupport::~nsEncoderSupport() -{ - delete [] mBuffer; - NS_IF_RELEASE(mErrEncoder); -} - -NS_IMETHODIMP nsEncoderSupport::ConvertNoBuff(const PRUnichar * aSrc, - PRInt32 * aSrcLength, - char * aDest, - PRInt32 * aDestLength) -{ - // we do all operations using pointers internally - const PRUnichar * src = aSrc; - const PRUnichar * srcEnd = aSrc + *aSrcLength; - char * dest = aDest; - char * destEnd = aDest + *aDestLength; - - PRInt32 bcr, bcw; // byte counts for read & write; - nsresult res; - - for (;;) { - bcr = srcEnd - src; - bcw = destEnd - dest; - res = ConvertNoBuffNoErr(src, &bcr, dest, &bcw); - src += bcr; - dest += bcw; - - if (res == NS_ERROR_UENC_NOMAPPING) { - if (mErrBehavior == kOnError_Replace) { - const PRUnichar buff[] = {mErrChar}; - bcr = 1; - bcw = destEnd - dest; - src--; // back the input: maybe the guy won't consume consume anything. - res = ConvertNoBuffNoErr(buff, &bcr, dest, &bcw); - src += bcr; - dest += bcw; - if (res != NS_OK) break; - } else if (mErrBehavior == kOnError_CallBack) { - bcw = destEnd - dest; - src--; - res = mErrEncoder->Convert(*src, dest, &bcw); - dest += bcw; - // if enought output space then the last char was used - if (res != NS_OK_UENC_MOREOUTPUT) src++; - if (res != NS_OK) break; - } else break; - } - else break; - } - - *aSrcLength -= srcEnd - src; - *aDestLength -= destEnd - dest; - return res; -} - -NS_IMETHODIMP nsEncoderSupport::FinishNoBuff(char * aDest, - PRInt32 * aDestLength) -{ - *aDestLength = 0; - return NS_OK; -} - -nsresult nsEncoderSupport::FlushBuffer(char ** aDest, const char * aDestEnd) -{ - PRInt32 bcr, bcw; // byte counts for read & write; - nsresult res = NS_OK; - char * dest = *aDest; - - if (mBufferStart < mBufferEnd) { - bcr = mBufferEnd - mBufferStart; - bcw = aDestEnd - dest; - if (bcw < bcr) bcr = bcw; - memcpy(dest, mBufferStart, bcr); - dest += bcr; - mBufferStart += bcr; - - if (mBufferStart < mBufferEnd) res = NS_OK_UENC_MOREOUTPUT; - } - - *aDest = dest; - return res; -} - - -//---------------------------------------------------------------------- -// Interface nsIUnicodeEncoder [implementation] - -NS_IMETHODIMP nsEncoderSupport::Convert(const PRUnichar * aSrc, - PRInt32 * aSrcLength, - char * aDest, - PRInt32 * aDestLength) -{ - // we do all operations using pointers internally - const PRUnichar * src = aSrc; - const PRUnichar * srcEnd = aSrc + *aSrcLength; - char * dest = aDest; - char * destEnd = aDest + *aDestLength; - - PRInt32 bcr, bcw; // byte counts for read & write; - nsresult res; - - res = FlushBuffer(&dest, destEnd); - if (res == NS_OK_UENC_MOREOUTPUT) goto final; - - bcr = srcEnd - src; - bcw = destEnd - dest; - res = ConvertNoBuff(src, &bcr, dest, &bcw); - src += bcr; - dest += bcw; - if ((res == NS_OK_UENC_MOREOUTPUT) && (dest < destEnd)) { - // convert exactly one character into the internal buffer - // at this point, there should be at least a char in the input - for (;;) { - bcr = 1; - bcw = mBufferCapacity; - res = ConvertNoBuff(src, &bcr, mBuffer, &bcw); - - if (res == NS_OK_UENC_MOREOUTPUT) { - delete [] mBuffer; - mBufferCapacity *= 2; - mBuffer = new char [mBufferCapacity]; - } else { - src += bcr; - mBufferStart = mBufferEnd = mBuffer; - mBufferEnd += bcw; - break; - } - } - - res = FlushBuffer(&dest, destEnd); - } - -final: - *aSrcLength -= srcEnd - src; - *aDestLength -= destEnd - dest; - return res; -} - -NS_IMETHODIMP nsEncoderSupport::Finish(char * aDest, PRInt32 * aDestLength) -{ - // we do all operations using pointers internally - char * dest = aDest; - char * destEnd = aDest + *aDestLength; - - PRInt32 bcw; // byte count for write; - nsresult res; - - res = FlushBuffer(&dest, destEnd); - if (res == NS_OK_UENC_MOREOUTPUT) goto final; - - // do the finish into the internal buffer. - for (;;) { - bcw = mBufferCapacity; - res = FinishNoBuff(mBuffer, &bcw); - - if (res == NS_OK_UENC_MOREOUTPUT) { - delete [] mBuffer; - mBufferCapacity *= 2; - mBuffer = new char [mBufferCapacity]; - } else { - mBufferStart = mBufferEnd = mBuffer; - mBufferEnd += bcw; - break; - } - } - - res = FlushBuffer(&dest, destEnd); - -final: - *aDestLength -= destEnd - dest; - return res; -} - -NS_IMETHODIMP nsEncoderSupport::Reset() -{ - mBufferStart = mBufferEnd = mBuffer; - return NS_OK; -} - -NS_IMETHODIMP nsEncoderSupport::SetOutputErrorBehavior( - PRInt32 aBehavior, - nsIUnicharEncoder * aEncoder, - PRUnichar aChar) -{ - if ((aBehavior == kOnError_CallBack) && (aEncoder == NULL)) - return NS_ERROR_NULL_POINTER; - - NS_IF_RELEASE(aEncoder); - mErrEncoder = aEncoder; - NS_IF_ADDREF(aEncoder); - - mErrBehavior = aBehavior; - mErrChar = aChar; - return NS_OK; -} - -//---------------------------------------------------------------------- -// Class nsTableEncoderSupport [implementation] - -nsTableEncoderSupport::nsTableEncoderSupport(uShiftTable * aShiftTable, - uMappingTable * aMappingTable) -: nsEncoderSupport() -{ - mHelper = NULL; - mShiftTable = aShiftTable; - mMappingTable = aMappingTable; -} - -nsTableEncoderSupport::~nsTableEncoderSupport() -{ - NS_IF_RELEASE(mHelper); -} - -NS_IMETHODIMP nsTableEncoderSupport::FillInfo(PRUint32 *aInfo) -{ - nsresult res; - - if (mHelper == nsnull) { - res = nsComponentManager::CreateInstance(kUnicodeEncodeHelperCID, NULL, - NS_GET_IID(nsIUnicodeEncodeHelper), (void**) & mHelper); - - if (NS_FAILED(res)) return NS_ERROR_UENC_NOHELPER; - } - - res = mHelper->FillInfo(aInfo, mMappingTable); - return res; -} -//---------------------------------------------------------------------- -// Subclassing of nsEncoderSupport class [implementation] - -NS_IMETHODIMP nsTableEncoderSupport::ConvertNoBuffNoErr( - const PRUnichar * aSrc, - PRInt32 * aSrcLength, - char * aDest, - PRInt32 * aDestLength) -{ - nsresult res; - - if (mHelper == nsnull) { - res = nsComponentManager::CreateInstance(kUnicodeEncodeHelperCID, NULL, - NS_GET_IID(nsIUnicodeEncodeHelper), (void**) & mHelper); - - if (NS_FAILED(res)) return NS_ERROR_UENC_NOHELPER; - } - - res = mHelper->ConvertByTable(aSrc, aSrcLength, aDest, aDestLength, - mShiftTable, mMappingTable); - return res; -} - -//---------------------------------------------------------------------- -// Class nsMultiTableEncoderSupport [implementation] - -nsMultiTableEncoderSupport::nsMultiTableEncoderSupport( - PRInt32 aTableCount, - uShiftTable ** aShiftTable, - uMappingTable ** aMappingTable) -: nsEncoderSupport() -{ - mHelper = NULL; - mTableCount = aTableCount; - mShiftTable = aShiftTable; - mMappingTable = aMappingTable; -} - -nsMultiTableEncoderSupport::~nsMultiTableEncoderSupport() -{ - NS_IF_RELEASE(mHelper); -} - -NS_IMETHODIMP nsMultiTableEncoderSupport::FillInfo(PRUint32 *aInfo) -{ - nsresult res; - - if (mHelper == nsnull) { - res = nsComponentManager::CreateInstance(kUnicodeEncodeHelperCID, NULL, - NS_GET_IID(nsIUnicodeEncodeHelper), (void**) & mHelper); - - if (NS_FAILED(res)) return NS_ERROR_UENC_NOHELPER; - } - - res = mHelper->FillInfo(aInfo,mTableCount, mMappingTable); - return res; -} -//---------------------------------------------------------------------- -// Subclassing of nsEncoderSupport class [implementation] - -NS_IMETHODIMP nsMultiTableEncoderSupport::ConvertNoBuffNoErr( - const PRUnichar * aSrc, - PRInt32 * aSrcLength, - char * aDest, - PRInt32 * aDestLength) -{ - nsresult res; - - if (mHelper == nsnull) { - res = nsComponentManager::CreateInstance(kUnicodeEncodeHelperCID, NULL, - NS_GET_IID(nsIUnicodeEncodeHelper), (void**) & mHelper); - - if (NS_FAILED(res)) return NS_ERROR_UENC_NOHELPER; - } - - res = mHelper->ConvertByMultiTable(aSrc, aSrcLength, aDest, aDestLength, - mTableCount, mShiftTable, mMappingTable); - return res; -} diff --git a/intl/uconv/ucvmath/nsUCvMathSupport.h b/intl/uconv/ucvmath/nsUCvMathSupport.h deleted file mode 100644 index e82e7f184d42..000000000000 --- a/intl/uconv/ucvmath/nsUCvMathSupport.h +++ /dev/null @@ -1,439 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: NPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Netscape Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Roger B. Sidje - * - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the NPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the NPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -#ifndef nsUCvMathSupport_h___ -#define nsUCvMathSupport_h___ - -#include "nsIUnicodeEncoder.h" -#include "nsIUnicodeDecoder.h" -#include "nsIUnicodeEncodeHelper.h" -#include "nsIUnicodeDecodeHelper.h" -#include "nsICharRepresentable.h" - -#define ONE_BYTE_TABLE_SIZE 256 - -//---------------------------------------------------------------------- -// Class nsBasicDecoderSupport [declaration] - -/** - * Support class for the Unicode decoders. - * - * The class source files for this class are in /ucvlatin/nsUCvMathSupport. - * However, because these objects requires non-xpcom subclassing, local copies - * will be made into the other directories using them. Just don't forget to - * keep in sync with the master copy! - * - * This class implements: - * - nsISupports - * - nsIUnicodeDecoder - * - * @created 19/Apr/1999 - * @author Catalin Rotaru [CATA] - */ -class nsBasicDecoderSupport : public nsIUnicodeDecoder -{ - NS_DECL_ISUPPORTS - -public: - - /** - * Class constructor. - */ - nsBasicDecoderSupport(); - - /** - * Class destructor. - */ - virtual ~nsBasicDecoderSupport(); - - //-------------------------------------------------------------------- - // Interface nsIUnicodeDecoder [declaration] -}; - -//---------------------------------------------------------------------- -// Class nsBufferDecoderSupport [declaration] - -/** - * Support class for the Unicode decoders. - * - * This class implements: - * - the buffer management - * - * @created 15/Mar/1999 - * @author Catalin Rotaru [CATA] - */ -class nsBufferDecoderSupport : public nsBasicDecoderSupport -{ -protected: - - /** - * Internal buffer for partial conversions. - */ - char * mBuffer; - PRInt32 mBufferCapacity; - PRInt32 mBufferLength; - - /** - * Convert method but *without* the buffer management stuff. - */ - NS_IMETHOD ConvertNoBuff(const char * aSrc, PRInt32 * aSrcLength, - PRUnichar * aDest, PRInt32 * aDestLength) = 0; - - void FillBuffer(const char ** aSrc, PRInt32 aSrcLength); - void DoubleBuffer(); - -public: - - /** - * Class constructor. - */ - nsBufferDecoderSupport(); - - /** - * Class destructor. - */ - virtual ~nsBufferDecoderSupport(); - - //-------------------------------------------------------------------- - // Interface nsIUnicodeDecoder [declaration] - - NS_IMETHOD Convert(const char * aSrc, PRInt32 * aSrcLength, - PRUnichar * aDest, PRInt32 * aDestLength); - NS_IMETHOD Reset(); -}; - -//---------------------------------------------------------------------- -// Class nsTableDecoderSupport [declaration] - -/** - * Support class for a single-table-driven Unicode decoder. - * - * @created 15/Mar/1999 - * @author Catalin Rotaru [CATA] - */ -class nsTableDecoderSupport : public nsBufferDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsTableDecoderSupport(uShiftTable * aShiftTable, - uMappingTable * aMappingTable); - - /** - * Class destructor. - */ - virtual ~nsTableDecoderSupport(); - -protected: - - nsIUnicodeDecodeHelper * mHelper; // decoder helper object - uShiftTable * mShiftTable; - uMappingTable * mMappingTable; - - //-------------------------------------------------------------------- - // Subclassing of nsBufferDecoderSupport class [declaration] - - NS_IMETHOD ConvertNoBuff(const char * aSrc, PRInt32 * aSrcLength, - PRUnichar * aDest, PRInt32 * aDestLength); -}; - -//---------------------------------------------------------------------- -// Class nsMultiTableDecoderSupport [declaration] - -/** - * Support class for a multi-table-driven Unicode decoder. - * - * @created 24/Mar/1999 - * @author Catalin Rotaru [CATA] - */ -class nsMultiTableDecoderSupport : public nsBufferDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsMultiTableDecoderSupport(PRInt32 aTableCount, uRange * aRangeArray, - uShiftTable ** aShiftTable, uMappingTable ** aMappingTable); - - /** - * Class destructor. - */ - virtual ~nsMultiTableDecoderSupport(); - -protected: - - nsIUnicodeDecodeHelper * mHelper; // decoder helper object - PRInt32 mTableCount; - uRange * mRangeArray; - uShiftTable ** mShiftTable; - uMappingTable ** mMappingTable; - - //-------------------------------------------------------------------- - // Subclassing of nsBufferDecoderSupport class [declaration] - - NS_IMETHOD ConvertNoBuff(const char * aSrc, PRInt32 * aSrcLength, - PRUnichar * aDest, PRInt32 * aDestLength); -}; - -//---------------------------------------------------------------------- -// Class nsBufferDecoderSupport [declaration] - -/** - * Support class for a single-byte Unicode decoder. - * - * @created 19/Apr/1999 - * @author Catalin Rotaru [CATA] - */ -class nsOneByteDecoderSupport : public nsBasicDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsOneByteDecoderSupport(uShiftTable * aShiftTable, - uMappingTable * aMappingTable); - - /** - * Class destructor. - */ - virtual ~nsOneByteDecoderSupport(); - -protected: - - nsIUnicodeDecodeHelper * mHelper; // decoder helper object - uShiftTable * mShiftTable; - uMappingTable * mMappingTable; - PRUnichar mFastTable[ONE_BYTE_TABLE_SIZE]; - - //-------------------------------------------------------------------- - // Subclassing of nsBasicDecoderSupport class [declaration] - - NS_IMETHOD Convert(const char * aSrc, PRInt32 * aSrcLength, - PRUnichar * aDest, PRInt32 * aDestLength); - NS_IMETHOD GetMaxLength(const char * aSrc, PRInt32 aSrcLength, - PRInt32 * aDestLength); - NS_IMETHOD Reset(); -}; - -//---------------------------------------------------------------------- -// Class nsBasicEncoder [declaration] - -class nsBasicEncoder : public nsIUnicodeEncoder, public nsICharRepresentable -{ - NS_DECL_ISUPPORTS - -public: - /** - * Class constructor. - */ - nsBasicEncoder(); - - /** - * Class destructor. - */ - virtual ~nsBasicEncoder(); - -}; -//---------------------------------------------------------------------- -// Class nsEncoderSupport [declaration] - -/** - * Support class for the Unicode encoders. - * - * This class implements: - * - nsISupports - * - the buffer management - * - error handling procedure(s) - * - * @created 17/Feb/1999 - * @author Catalin Rotaru [CATA] - */ -class nsEncoderSupport : public nsBasicEncoder -{ - -protected: - - /** - * Internal buffer for partial conversions. - */ - char * mBuffer; - PRInt32 mBufferCapacity; - char * mBufferStart; - char * mBufferEnd; - - /** - * Error handling stuff - */ - PRInt32 mErrBehavior; - nsIUnicharEncoder * mErrEncoder; - PRUnichar mErrChar; - - /** - * Convert method but *without* the buffer management stuff and *with* - * error handling stuff. - */ - NS_IMETHOD ConvertNoBuff(const PRUnichar * aSrc, PRInt32 * aSrcLength, - char * aDest, PRInt32 * aDestLength); - - /** - * Convert method but *without* the buffer management stuff and *without* - * error handling stuff. - */ - NS_IMETHOD ConvertNoBuffNoErr(const PRUnichar * aSrc, PRInt32 * aSrcLength, - char * aDest, PRInt32 * aDestLength) = 0; - - /** - * Finish method but *without* the buffer management stuff. - */ - NS_IMETHOD FinishNoBuff(char * aDest, PRInt32 * aDestLength); - - /** - * Copy as much as possible from the internal buffer to the destination. - */ - nsresult FlushBuffer(char ** aDest, const char * aDestEnd); - -public: - - /** - * Class constructor. - */ - nsEncoderSupport(); - - /** - * Class destructor. - */ - virtual ~nsEncoderSupport(); - - //-------------------------------------------------------------------- - // Interface nsIUnicodeEncoder [declaration] - - NS_IMETHOD Convert(const PRUnichar * aSrc, PRInt32 * aSrcLength, - char * aDest, PRInt32 * aDestLength); - NS_IMETHOD Finish(char * aDest, PRInt32 * aDestLength); - NS_IMETHOD Reset(); - NS_IMETHOD SetOutputErrorBehavior(PRInt32 aBehavior, - nsIUnicharEncoder * aEncoder, PRUnichar aChar); - - //-------------------------------------------------------------------- - // Interface nsICharRepresentable [declaration] - NS_IMETHOD FillInfo(PRUint32 *aInfo) = 0; -}; - -//---------------------------------------------------------------------- -// Class nsTableEncoderSupport [declaration] - -/** - * Support class for a single-table-driven Unicode encoder. - * - * @created 17/Feb/1999 - * @author Catalin Rotaru [CATA] - */ -class nsTableEncoderSupport : public nsEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsTableEncoderSupport(uShiftTable * aShiftTable, - uMappingTable * aMappingTable); - - /** - * Class destructor. - */ - virtual ~nsTableEncoderSupport(); - NS_IMETHOD FillInfo( PRUint32 *aInfo); - -protected: - - nsIUnicodeEncodeHelper * mHelper; // encoder helper object - uShiftTable * mShiftTable; - uMappingTable * mMappingTable; - - //-------------------------------------------------------------------- - // Subclassing of nsEncoderSupport class [declaration] - - NS_IMETHOD ConvertNoBuffNoErr(const PRUnichar * aSrc, PRInt32 * aSrcLength, - char * aDest, PRInt32 * aDestLength); -}; - -//---------------------------------------------------------------------- -// Class nsMultiTableEncoderSupport [declaration] - -/** - * Support class for a multi-table-driven Unicode encoder. - * - * @created 11/Mar/1999 - * @author Catalin Rotaru [CATA] - */ -class nsMultiTableEncoderSupport : public nsEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsMultiTableEncoderSupport(PRInt32 aTableCount, uShiftTable ** aShiftTable, - uMappingTable ** aMappingTable); - - /** - * Class destructor. - */ - virtual ~nsMultiTableEncoderSupport(); - NS_IMETHOD FillInfo( PRUint32 *aInfo); - -protected: - - nsIUnicodeEncodeHelper * mHelper; // encoder helper object - PRInt32 mTableCount; - uShiftTable ** mShiftTable; - uMappingTable ** mMappingTable; - - //-------------------------------------------------------------------- - // Subclassing of nsEncoderSupport class [declaration] - - NS_IMETHOD ConvertNoBuffNoErr(const PRUnichar * aSrc, PRInt32 * aSrcLength, - char * aDest, PRInt32 * aDestLength); -}; - -#endif /* nsUCvMathSupport_h___ */ diff --git a/intl/uconv/ucvtw/nsBIG5HKSCSToUnicode.cpp b/intl/uconv/ucvtw/nsBIG5HKSCSToUnicode.cpp index 240b31a494c8..c2248e38ae4b 100644 --- a/intl/uconv/ucvtw/nsBIG5HKSCSToUnicode.cpp +++ b/intl/uconv/ucvtw/nsBIG5HKSCSToUnicode.cpp @@ -38,6 +38,7 @@ #include "nsBIG5HKSCSToUnicode.h" #include "nsUCvTWDll.h" +#include "nsUCConstructors.h" //---------------------------------------------------------------------- // Global functions and data [declaration] @@ -84,13 +85,16 @@ static const uRange g_BIG5HKSCSRanges[] = { //---------------------------------------------------------------------- // Class nsBIG5HKSCSToUnicode [implementation] -nsBIG5HKSCSToUnicode::nsBIG5HKSCSToUnicode() -: nsMultiTableDecoderSupport(6, - (uRange* ) &g_BIG5HKSCSRanges, - (uShiftTable**) &g_BIG5HKSCSShiftTableSet, - (uMappingTable**) &g_BIG5HKSCSMappingTableSet, - 1) +NS_METHOD +nsBIG5HKSCSToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateMultiTableDecoder(6, + (uRange* ) &g_BIG5HKSCSRanges, + (uShiftTable**) &g_BIG5HKSCSShiftTableSet, + (uMappingTable**) &g_BIG5HKSCSMappingTableSet, + 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvtw/nsBIG5HKSCSToUnicode.h b/intl/uconv/ucvtw/nsBIG5HKSCSToUnicode.h index 45dc38b29554..9f31d1f06025 100644 --- a/intl/uconv/ucvtw/nsBIG5HKSCSToUnicode.h +++ b/intl/uconv/ucvtw/nsBIG5HKSCSToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsBIG5HKSCSToUnicode_h___ #define nsBIG5HKSCSToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsBIG5HKSCSToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from BIG5-HKSCS to Unicode. @@ -50,16 +47,8 @@ * @created 02/Jul/2000 * @author Gavin Ho, Hong Kong Professional Services, Compaq Computer (Hong Kong) Ltd. */ -class nsBIG5HKSCSToUnicode : public nsMultiTableDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsBIG5HKSCSToUnicode(); - -protected: -}; +NS_METHOD +nsBIG5HKSCSToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsBIG5HKSCSToUnicode_h___ */ diff --git a/intl/uconv/ucvtw/nsBIG5ToUnicode.cpp b/intl/uconv/ucvtw/nsBIG5ToUnicode.cpp index b0f9ee4b3948..30ff482b58e3 100644 --- a/intl/uconv/ucvtw/nsBIG5ToUnicode.cpp +++ b/intl/uconv/ucvtw/nsBIG5ToUnicode.cpp @@ -38,6 +38,7 @@ #include "nsBIG5ToUnicode.h" #include "nsUCvTWDll.h" +#include "nsUCConstructors.h" //---------------------------------------------------------------------- // Global functions and data [declaration] @@ -68,15 +69,15 @@ static const uRange g_BIG5Ranges[] = { { 0x81, 0xFC } }; -//---------------------------------------------------------------------- -// Class nsBIG5ToUnicode [implementation] - -nsBIG5ToUnicode::nsBIG5ToUnicode() -: nsMultiTableDecoderSupport(2, - (uRange* ) &g_BIG5Ranges, - (uShiftTable**) &g_BIG5ShiftTableSet, - (uMappingTable**) &g_BIG5MappingTableSet, 1) +NS_METHOD +nsBIG5ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateMultiTableDecoder(2, + (uRange* ) &g_BIG5Ranges, + (uShiftTable**) &g_BIG5ShiftTableSet, + (uMappingTable**) &g_BIG5MappingTableSet, 1, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvtw/nsBIG5ToUnicode.h b/intl/uconv/ucvtw/nsBIG5ToUnicode.h index e49d72f8af95..7de2507d5b6e 100644 --- a/intl/uconv/ucvtw/nsBIG5ToUnicode.h +++ b/intl/uconv/ucvtw/nsBIG5ToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsBIG5ToUnicode_h___ #define nsBIG5ToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsBIG5ToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from BIG5 to Unicode. @@ -50,17 +47,8 @@ * @created 06/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsBIG5ToUnicode : public nsMultiTableDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsBIG5ToUnicode(); - -protected: - -}; +NS_METHOD +nsBIG5ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsBIG5ToUnicode_h___ */ diff --git a/intl/uconv/ucvtw/nsUnicodeToBIG5.cpp b/intl/uconv/ucvtw/nsUnicodeToBIG5.cpp index 9e5ebf39bb6e..97a2fbd2f24f 100644 --- a/intl/uconv/ucvtw/nsUnicodeToBIG5.cpp +++ b/intl/uconv/ucvtw/nsUnicodeToBIG5.cpp @@ -38,6 +38,7 @@ #include "nsUnicodeToBIG5.h" #include "nsUCvTWDll.h" +#include "nsUCConstructors.h" //---------------------------------------------------------------------- // Global functions and data [declaration] @@ -67,11 +68,15 @@ static const PRUint16 *g_Big5ShiftTable[2] = { //---------------------------------------------------------------------- // Class nsUnicodeToBIG5 [implementation] -nsUnicodeToBIG5::nsUnicodeToBIG5() -: nsMultiTableEncoderSupport(2, - (uShiftTable**) &g_Big5ShiftTable, - (uMappingTable**) &g_Big5MappingTable, - 2 /* max length = src * 2 */) +NS_METHOD +nsUnicodeToBIG5Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + + return CreateMultiTableEncoder(2, + (uShiftTable**) &g_Big5ShiftTable, + (uMappingTable**) &g_Big5MappingTable, + 2 /* max length = src * 2 */, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvtw/nsUnicodeToBIG5.h b/intl/uconv/ucvtw/nsUnicodeToBIG5.h index 357fa31d0386..2ac16e238220 100644 --- a/intl/uconv/ucvtw/nsUnicodeToBIG5.h +++ b/intl/uconv/ucvtw/nsUnicodeToBIG5.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToBIG5_h___ #define nsUnicodeToBIG5_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToBIG5 [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to BIG5. @@ -50,16 +47,8 @@ * @created 06/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToBIG5 : public nsMultiTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToBIG5(); - -protected: -}; +NS_METHOD +nsUnicodeToBIG5Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToBIG5_h___ */ diff --git a/intl/uconv/ucvtw/nsUnicodeToBIG5HKSCS.cpp b/intl/uconv/ucvtw/nsUnicodeToBIG5HKSCS.cpp index cd2197a361f2..3db76938075e 100644 --- a/intl/uconv/ucvtw/nsUnicodeToBIG5HKSCS.cpp +++ b/intl/uconv/ucvtw/nsUnicodeToBIG5HKSCS.cpp @@ -38,6 +38,7 @@ #include "nsUnicodeToBIG5HKSCS.h" #include "nsUCvTWDll.h" +#include "nsUCConstructors.h" //---------------------------------------------------------------------- // Global functions and data [declaration] @@ -66,15 +67,16 @@ static const PRUint16 *g_Big5HKSCSShiftTable[] = { gBig5HKSCSShiftTable }; -//---------------------------------------------------------------------- -// Class nsUnicodeToBIG5HKSCS [implementation] -nsUnicodeToBIG5HKSCS::nsUnicodeToBIG5HKSCS() -: nsMultiTableEncoderSupport(3, - (uShiftTable**) &g_Big5HKSCSShiftTable, - (uMappingTable**) &g_Big5HKSCSMappingTable, - 2 /* max length = src * 2 */) +NS_METHOD +nsUnicodeToBIG5HKSCSConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateMultiTableEncoder(3, + (uShiftTable**) &g_Big5HKSCSShiftTable, + (uMappingTable**) &g_Big5HKSCSMappingTable, + 2 /* max length = src * 2 */, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvtw/nsUnicodeToBIG5HKSCS.h b/intl/uconv/ucvtw/nsUnicodeToBIG5HKSCS.h index c25b0b36dbd3..347a61d8c303 100644 --- a/intl/uconv/ucvtw/nsUnicodeToBIG5HKSCS.h +++ b/intl/uconv/ucvtw/nsUnicodeToBIG5HKSCS.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToBIG5HKSCS_h___ #define nsUnicodeToBIG5HKSCS_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToBIG5HKSCS [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to BIG5-HKSCS. @@ -50,16 +47,8 @@ * @created 02/Jul/2000 * @author Gavin Ho, Hong Kong Professional Services, Compaq Computer (Hong Kong) Ltd. */ -class nsUnicodeToBIG5HKSCS : public nsMultiTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToBIG5HKSCS(); - -protected: -}; +NS_METHOD +nsUnicodeToBIG5HKSCSConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToBIG5HKSCS_h___ */ diff --git a/intl/uconv/ucvtw/nsUnicodeToHKSCS.cpp b/intl/uconv/ucvtw/nsUnicodeToHKSCS.cpp index f31f40a4c95f..97a9be054f8d 100644 --- a/intl/uconv/ucvtw/nsUnicodeToHKSCS.cpp +++ b/intl/uconv/ucvtw/nsUnicodeToHKSCS.cpp @@ -38,6 +38,7 @@ #include "nsUnicodeToHKSCS.h" #include "nsUCvTWDll.h" +#include "nsUCConstructors.h" //---------------------------------------------------------------------- // Global functions and data [declaration] @@ -61,11 +62,14 @@ static const PRUint16 *g_Big5HKSCSShiftTable[] = { //---------------------------------------------------------------------- // Class nsUnicodeToHKSCS [implementation] -nsUnicodeToHKSCS::nsUnicodeToHKSCS() -: nsMultiTableEncoderSupport(1, - (uShiftTable**) &g_Big5HKSCSShiftTable, - (uMappingTable**) &g_Big5HKSCSMappingTable, - 2 /* max length = src * 2 */) +NS_METHOD +nsUnicodeToHKSCSConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateMultiTableEncoder(1, + (uShiftTable**) &g_Big5HKSCSShiftTable, + (uMappingTable**) &g_Big5HKSCSMappingTable, + 2 /* max length = src * 2 */, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvtw/nsUnicodeToHKSCS.h b/intl/uconv/ucvtw/nsUnicodeToHKSCS.h index e1be2a83aaba..572a83f8fba1 100644 --- a/intl/uconv/ucvtw/nsUnicodeToHKSCS.h +++ b/intl/uconv/ucvtw/nsUnicodeToHKSCS.h @@ -39,25 +39,14 @@ #ifndef nsUnicodeToHKSCS_h___ #define nsUnicodeToHKSCS_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToHKSCS [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to HKSCS. * */ -class nsUnicodeToHKSCS : public nsMultiTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToHKSCS(); - -protected: -}; +NS_METHOD +nsUnicodeToHKSCSConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToHKSCS_h___ */ diff --git a/intl/uconv/ucvtw2/nsEUCTWToUnicode.cpp b/intl/uconv/ucvtw2/nsEUCTWToUnicode.cpp index e9b1e96c4c3a..549ec142d07f 100644 --- a/intl/uconv/ucvtw2/nsEUCTWToUnicode.cpp +++ b/intl/uconv/ucvtw2/nsEUCTWToUnicode.cpp @@ -38,6 +38,7 @@ #include "nsEUCTWToUnicode.h" #include "nsUCvTW2Dll.h" +#include "nsUCConstructors.h" //---------------------------------------------------------------------- // Global functions and data [declaration] @@ -117,11 +118,13 @@ static const uRange g_EUCTWRanges[] = { //---------------------------------------------------------------------- // Class nsEUCTWToUnicode [implementation] -nsEUCTWToUnicode::nsEUCTWToUnicode() -: nsMultiTableDecoderSupport(8, - (uRange*) &g_EUCTWRanges, - (uShiftTable**) &g_EUCTWShiftTableSet, - (uMappingTable**) &g_EUCTWMappingTableSet, - 1) +NS_METHOD +nsEUCTWToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateMultiTableDecoder(8, + (uRange*) &g_EUCTWRanges, + (uShiftTable**) &g_EUCTWShiftTableSet, + (uMappingTable**) &g_EUCTWMappingTableSet, + 1, aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvtw2/nsEUCTWToUnicode.h b/intl/uconv/ucvtw2/nsEUCTWToUnicode.h index 131eff3903a6..ad646a0996d4 100644 --- a/intl/uconv/ucvtw2/nsEUCTWToUnicode.h +++ b/intl/uconv/ucvtw2/nsEUCTWToUnicode.h @@ -39,10 +39,7 @@ #ifndef nsEUCTWToUnicode_h___ #define nsEUCTWToUnicode_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsEUCTWToUnicode [declaration] +#include "nsISupports.h" /** * A character set converter from EUCTW to Unicode. @@ -50,17 +47,8 @@ * @created 06/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsEUCTWToUnicode : public nsMultiTableDecoderSupport -{ -public: - - /** - * Class constructor. - */ - nsEUCTWToUnicode(); - -protected: - -}; +NS_METHOD +nsEUCTWToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsEUCTWToUnicode_h___ */ diff --git a/intl/uconv/ucvtw2/nsUnicodeToCNS11643p1.cpp b/intl/uconv/ucvtw2/nsUnicodeToCNS11643p1.cpp index 52af1945e6f7..5e3afef12958 100644 --- a/intl/uconv/ucvtw2/nsUnicodeToCNS11643p1.cpp +++ b/intl/uconv/ucvtw2/nsUnicodeToCNS11643p1.cpp @@ -38,6 +38,7 @@ #include "nsUnicodeToCNS11643p1.h" #include "nsUCvTW2Dll.h" +#include "nsUCConstructors.h" //---------------------------------------------------------------------- // Global functions and data [declaration] @@ -50,10 +51,13 @@ static PRInt16 g_ShiftTable[] = { //---------------------------------------------------------------------- // Class nsUnicodeToCNS11643p1 [implementation] -nsUnicodeToCNS11643p1::nsUnicodeToCNS11643p1() -: nsTableEncoderSupport((uShiftTable*) &g_ShiftTable, - (uMappingTable*) &g_ufCNS1MappingTable, - 2 /* max length = src * 2 */) +NS_METHOD +nsUnicodeToCNS11643p1Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ShiftTable, + (uMappingTable*) &g_ufCNS1MappingTable, + 2 /* max length = src * 2 */, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvtw2/nsUnicodeToCNS11643p1.h b/intl/uconv/ucvtw2/nsUnicodeToCNS11643p1.h index fc8e5509c001..3c22afe65e41 100644 --- a/intl/uconv/ucvtw2/nsUnicodeToCNS11643p1.h +++ b/intl/uconv/ucvtw2/nsUnicodeToCNS11643p1.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToCNS11643p1_h___ #define nsUnicodeToCNS11643p1_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToCNS11643p1 [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to CNS11643p1. @@ -50,16 +47,8 @@ * @created 06/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToCNS11643p1 : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToCNS11643p1(); - -protected: -}; +NS_METHOD +nsUnicodeToCNS11643p1Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToCNS11643p1_h___ */ diff --git a/intl/uconv/ucvtw2/nsUnicodeToCNS11643p2.cpp b/intl/uconv/ucvtw2/nsUnicodeToCNS11643p2.cpp index 211a9e8072a8..982b3dd0e9e6 100644 --- a/intl/uconv/ucvtw2/nsUnicodeToCNS11643p2.cpp +++ b/intl/uconv/ucvtw2/nsUnicodeToCNS11643p2.cpp @@ -38,6 +38,8 @@ #include "nsUnicodeToCNS11643p2.h" #include "nsUCvTW2Dll.h" +#include "nsUCConstructors.h" + //---------------------------------------------------------------------- // Global functions and data [declaration] @@ -47,13 +49,13 @@ static PRInt16 g_ShiftTable[] = { ShiftCell(0, 0, 0, 0, 0, 0, 0, 0), }; -//---------------------------------------------------------------------- -// Class nsUnicodeToCNS11643p2 [implementation] - -nsUnicodeToCNS11643p2::nsUnicodeToCNS11643p2() -: nsTableEncoderSupport((uShiftTable*) &g_ShiftTable, - (uMappingTable*) &g_ufCNS2MappingTable, - 2 /* max length = src * 2 */) +NS_METHOD +nsUnicodeToCNS11643p2Constructor(nsISupports* aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ShiftTable, + (uMappingTable*) &g_ufCNS2MappingTable, + 2 /* max length = src * 2 */, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvtw2/nsUnicodeToCNS11643p2.h b/intl/uconv/ucvtw2/nsUnicodeToCNS11643p2.h index 72bc67eafcdc..a6c0bc1cfbed 100644 --- a/intl/uconv/ucvtw2/nsUnicodeToCNS11643p2.h +++ b/intl/uconv/ucvtw2/nsUnicodeToCNS11643p2.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToCNS11643p2_h___ #define nsUnicodeToCNS11643p2_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToCNS11643p2 [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to CNS11643p2. @@ -50,16 +47,8 @@ * @created 06/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToCNS11643p2 : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToCNS11643p2(); - -protected: -}; +NS_METHOD +nsUnicodeToCNS11643p2Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToCNS11643p2_h___ */ diff --git a/intl/uconv/ucvtw2/nsUnicodeToCNS11643p3.cpp b/intl/uconv/ucvtw2/nsUnicodeToCNS11643p3.cpp index 7b585b298a37..6cc465b36426 100644 --- a/intl/uconv/ucvtw2/nsUnicodeToCNS11643p3.cpp +++ b/intl/uconv/ucvtw2/nsUnicodeToCNS11643p3.cpp @@ -38,6 +38,8 @@ #include "nsUnicodeToCNS11643p3.h" #include "nsUCvTW2Dll.h" +#include "nsUCConstructors.h" + //---------------------------------------------------------------------- // Global functions and data [declaration] @@ -47,13 +49,13 @@ static PRInt16 g_ShiftTable[] = { ShiftCell(0, 0, 0, 0, 0, 0, 0, 0), }; -//---------------------------------------------------------------------- -// Class nsUnicodeToCNS11643p3 [implementation] - -nsUnicodeToCNS11643p3::nsUnicodeToCNS11643p3() -: nsTableEncoderSupport((uShiftTable*) &g_ShiftTable, - (uMappingTable*) &g_ufCNS3MappingTable, - 2 /* max length = src * 2 */) +NS_METHOD +nsUnicodeToCNS11643p3Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ShiftTable, + (uMappingTable*) &g_ufCNS3MappingTable, + 2 /* max length = src * 2 */, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvtw2/nsUnicodeToCNS11643p3.h b/intl/uconv/ucvtw2/nsUnicodeToCNS11643p3.h index 561e10a7746c..aa747dead504 100644 --- a/intl/uconv/ucvtw2/nsUnicodeToCNS11643p3.h +++ b/intl/uconv/ucvtw2/nsUnicodeToCNS11643p3.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToCNS11643p3_h___ #define nsUnicodeToCNS11643p3_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToCNS11643p3 [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to CNS11643p3. @@ -50,16 +47,8 @@ * @created 06/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToCNS11643p3 : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToCNS11643p3(); - -protected: -}; +NS_METHOD +nsUnicodeToCNS11643p3Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToCNS11643p3_h___ */ diff --git a/intl/uconv/ucvtw2/nsUnicodeToCNS11643p4.cpp b/intl/uconv/ucvtw2/nsUnicodeToCNS11643p4.cpp index a33426df73b8..6ee13d2f19a7 100644 --- a/intl/uconv/ucvtw2/nsUnicodeToCNS11643p4.cpp +++ b/intl/uconv/ucvtw2/nsUnicodeToCNS11643p4.cpp @@ -38,6 +38,8 @@ #include "nsUnicodeToCNS11643p4.h" #include "nsUCvTW2Dll.h" +#include "nsUCConstructors.h" + //---------------------------------------------------------------------- // Global functions and data [declaration] @@ -47,13 +49,13 @@ static PRInt16 g_ShiftTable[] = { ShiftCell(0, 0, 0, 0, 0, 0, 0, 0), }; -//---------------------------------------------------------------------- -// Class nsUnicodeToCNS11643p4 [implementation] - -nsUnicodeToCNS11643p4::nsUnicodeToCNS11643p4() -: nsTableEncoderSupport((uShiftTable*) &g_ShiftTable, - (uMappingTable*) &g_ufCNS4MappingTable, - 2 /* max length = src * 2 */) +NS_METHOD +nsUnicodeToCNS11643p4Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ShiftTable, + (uMappingTable*) &g_ufCNS4MappingTable, + 2 /* max length = src * 2 */, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvtw2/nsUnicodeToCNS11643p4.h b/intl/uconv/ucvtw2/nsUnicodeToCNS11643p4.h index 8d3488264953..08220667dcbf 100644 --- a/intl/uconv/ucvtw2/nsUnicodeToCNS11643p4.h +++ b/intl/uconv/ucvtw2/nsUnicodeToCNS11643p4.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToCNS11643p4_h___ #define nsUnicodeToCNS11643p4_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToCNS11643p4 [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to CNS11643p4. @@ -50,16 +47,8 @@ * @created 06/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToCNS11643p4 : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToCNS11643p4(); - -protected: -}; +NS_METHOD +nsUnicodeToCNS11643p4Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToCNS11643p4_h___ */ diff --git a/intl/uconv/ucvtw2/nsUnicodeToCNS11643p5.cpp b/intl/uconv/ucvtw2/nsUnicodeToCNS11643p5.cpp index 4014fb0fde7b..3417bb921a9a 100644 --- a/intl/uconv/ucvtw2/nsUnicodeToCNS11643p5.cpp +++ b/intl/uconv/ucvtw2/nsUnicodeToCNS11643p5.cpp @@ -38,6 +38,7 @@ #include "nsUnicodeToCNS11643p5.h" #include "nsUCvTW2Dll.h" +#include "nsUCConstructors.h" //---------------------------------------------------------------------- // Global functions and data [declaration] @@ -47,13 +48,13 @@ static PRInt16 g_ShiftTable[] = { ShiftCell(0, 0, 0, 0, 0, 0, 0, 0), }; -//---------------------------------------------------------------------- -// Class nsUnicodeToCNS11643p5 [implementation] - -nsUnicodeToCNS11643p5::nsUnicodeToCNS11643p5() -: nsTableEncoderSupport((uShiftTable*) &g_ShiftTable, - (uMappingTable*) &g_ufCNS5MappingTable, - 2 /* max length = src * 2 */) +NS_METHOD +nsUnicodeToCNS11643p5Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ShiftTable, + (uMappingTable*) &g_ufCNS5MappingTable, + 2 /* max length = src * 2 */, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvtw2/nsUnicodeToCNS11643p5.h b/intl/uconv/ucvtw2/nsUnicodeToCNS11643p5.h index 96b60b5b0b49..9ef274acce2c 100644 --- a/intl/uconv/ucvtw2/nsUnicodeToCNS11643p5.h +++ b/intl/uconv/ucvtw2/nsUnicodeToCNS11643p5.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToCNS11643p5_h___ #define nsUnicodeToCNS11643p5_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToCNS11643p5 [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to CNS11643p5. @@ -50,16 +47,8 @@ * @created 06/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToCNS11643p5 : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToCNS11643p5(); - -protected: -}; +NS_METHOD +nsUnicodeToCNS11643p5Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToCNS11643p5_h___ */ diff --git a/intl/uconv/ucvtw2/nsUnicodeToCNS11643p6.cpp b/intl/uconv/ucvtw2/nsUnicodeToCNS11643p6.cpp index 9a351c0c808d..a142854d83da 100644 --- a/intl/uconv/ucvtw2/nsUnicodeToCNS11643p6.cpp +++ b/intl/uconv/ucvtw2/nsUnicodeToCNS11643p6.cpp @@ -38,6 +38,7 @@ #include "nsUnicodeToCNS11643p6.h" #include "nsUCvTW2Dll.h" +#include "nsUCConstructors.h" //---------------------------------------------------------------------- // Global functions and data [declaration] @@ -47,13 +48,13 @@ static PRInt16 g_ShiftTable[] = { ShiftCell(0, 0, 0, 0, 0, 0, 0, 0), }; -//---------------------------------------------------------------------- -// Class nsUnicodeToCNS11643p6 [implementation] - -nsUnicodeToCNS11643p6::nsUnicodeToCNS11643p6() -: nsTableEncoderSupport((uShiftTable*) &g_ShiftTable, - (uMappingTable*) &g_ufCNS6MappingTable, - 2 /* max length = src * 2 */) +NS_METHOD +nsUnicodeToCNS11643p6Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ShiftTable, + (uMappingTable*) &g_ufCNS6MappingTable, + 2 /* max length = src * 2 */, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvtw2/nsUnicodeToCNS11643p6.h b/intl/uconv/ucvtw2/nsUnicodeToCNS11643p6.h index dbdb5fbd863f..416369358215 100644 --- a/intl/uconv/ucvtw2/nsUnicodeToCNS11643p6.h +++ b/intl/uconv/ucvtw2/nsUnicodeToCNS11643p6.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToCNS11643p6_h___ #define nsUnicodeToCNS11643p6_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToCNS11643p6 [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to CNS11643p6. @@ -50,16 +47,8 @@ * @created 06/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToCNS11643p6 : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToCNS11643p6(); - -protected: -}; +NS_METHOD +nsUnicodeToCNS11643p6Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToCNS11643p6_h___ */ diff --git a/intl/uconv/ucvtw2/nsUnicodeToCNS11643p7.cpp b/intl/uconv/ucvtw2/nsUnicodeToCNS11643p7.cpp index de27edc48421..ddb7f111b4f9 100644 --- a/intl/uconv/ucvtw2/nsUnicodeToCNS11643p7.cpp +++ b/intl/uconv/ucvtw2/nsUnicodeToCNS11643p7.cpp @@ -38,6 +38,7 @@ #include "nsUnicodeToCNS11643p7.h" #include "nsUCvTW2Dll.h" +#include "nsUCConstructors.h" //---------------------------------------------------------------------- // Global functions and data [declaration] @@ -47,13 +48,13 @@ static PRInt16 g_ShiftTable[] = { ShiftCell(0, 0, 0, 0, 0, 0, 0, 0), }; -//---------------------------------------------------------------------- -// Class nsUnicodeToCNS11643p7 [implementation] - -nsUnicodeToCNS11643p7::nsUnicodeToCNS11643p7() -: nsTableEncoderSupport((uShiftTable*) &g_ShiftTable, - (uMappingTable*) &g_ufCNS7MappingTable, - 2 /* max length = src * 2 */) +NS_METHOD +nsUnicodeToCNS11643p7Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateTableEncoder((uShiftTable*) &g_ShiftTable, + (uMappingTable*) &g_ufCNS7MappingTable, + 2 /* max length = src * 2 */, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvtw2/nsUnicodeToCNS11643p7.h b/intl/uconv/ucvtw2/nsUnicodeToCNS11643p7.h index 0a3126925da6..8701d6ddcb0b 100644 --- a/intl/uconv/ucvtw2/nsUnicodeToCNS11643p7.h +++ b/intl/uconv/ucvtw2/nsUnicodeToCNS11643p7.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToCNS11643p7_h___ #define nsUnicodeToCNS11643p7_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToCNS11643p7 [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to CNS11643p7. @@ -50,16 +47,8 @@ * @created 06/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToCNS11643p7 : public nsTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToCNS11643p7(); - -protected: -}; +NS_METHOD +nsUnicodeToCNS11643p7Constructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToCNS11643p7_h___ */ diff --git a/intl/uconv/ucvtw2/nsUnicodeToEUCTW.cpp b/intl/uconv/ucvtw2/nsUnicodeToEUCTW.cpp index db0dbad7da3b..c7e615618edf 100644 --- a/intl/uconv/ucvtw2/nsUnicodeToEUCTW.cpp +++ b/intl/uconv/ucvtw2/nsUnicodeToEUCTW.cpp @@ -38,6 +38,7 @@ #include "nsUnicodeToEUCTW.h" #include "nsUCvTW2Dll.h" +#include "nsUCConstructors.h" //---------------------------------------------------------------------- // Global functions and data [declaration] @@ -103,11 +104,14 @@ static const PRUint16 *g_EUCTWMappingTableSet [] ={ //---------------------------------------------------------------------- // Class nsUnicodeToEUCTW [implementation] -nsUnicodeToEUCTW::nsUnicodeToEUCTW() -: nsMultiTableEncoderSupport( 8, - (uShiftTable**) &g_EUCTWShiftTableSet, - (uMappingTable**) &g_EUCTWMappingTableSet, - 4 /* max length = src * 4 */) +NS_METHOD +nsUnicodeToEUCTWConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult) { + return CreateMultiTableEncoder(8, + (uShiftTable**) &g_EUCTWShiftTableSet, + (uMappingTable**) &g_EUCTWMappingTableSet, + 4 /* max length = src * 4 */, + aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvtw2/nsUnicodeToEUCTW.h b/intl/uconv/ucvtw2/nsUnicodeToEUCTW.h index 3c7a7ec87a80..cfcf8cb56796 100644 --- a/intl/uconv/ucvtw2/nsUnicodeToEUCTW.h +++ b/intl/uconv/ucvtw2/nsUnicodeToEUCTW.h @@ -39,10 +39,7 @@ #ifndef nsUnicodeToEUCTW_h___ #define nsUnicodeToEUCTW_h___ -#include "nsUCSupport.h" - -//---------------------------------------------------------------------- -// Class nsUnicodeToEUCTW [declaration] +#include "nsISupports.h" /** * A character set converter from Unicode to EUCTW. @@ -50,16 +47,8 @@ * @created 06/Apr/1999 * @author Catalin Rotaru [CATA] */ -class nsUnicodeToEUCTW : public nsMultiTableEncoderSupport -{ -public: - - /** - * Class constructor. - */ - nsUnicodeToEUCTW(); - -protected: -}; +NS_METHOD +nsUnicodeToEUCTWConstructor(nsISupports *aOuter, REFNSIID aIID, + void **aResult); #endif /* nsUnicodeToEUCTW_h___ */ diff --git a/intl/uconv/util/nsUCConstructors.cpp b/intl/uconv/util/nsUCConstructors.cpp index 61759341e0e9..9caca219d8b2 100644 --- a/intl/uconv/util/nsUCConstructors.cpp +++ b/intl/uconv/util/nsUCConstructors.cpp @@ -42,7 +42,7 @@ #include "nsUCConstructors.h" template -inline nsresult StabilizedQueryInterface(T* aNewObject, +inline NS_METHOD StabilizedQueryInterface(T* aNewObject, REFNSIID aIID, void **aResult) { @@ -52,7 +52,7 @@ inline nsresult StabilizedQueryInterface(T* aNewObject, return rv; } -nsresult +NS_METHOD CreateMultiTableDecoder(PRInt32 aTableCount, uRange * aRangeArray, uShiftTable ** aShiftTable, uMappingTable ** aMappingTable, @@ -75,8 +75,8 @@ CreateMultiTableDecoder(PRInt32 aTableCount, uRange * aRangeArray, return StabilizedQueryInterface(decoder, aIID, aResult); } -nsresult -CreateMultiTableEncoder(PRInt32 aTableCount, uRange * aRangeArray, +NS_METHOD +CreateMultiTableEncoder(PRInt32 aTableCount, uShiftTable ** aShiftTable, uMappingTable ** aMappingTable, PRUint32 aMaxLengthFactor, @@ -98,12 +98,13 @@ CreateMultiTableEncoder(PRInt32 aTableCount, uRange * aRangeArray, return StabilizedQueryInterface(encoder, aIID, aResult); } -nsresult CreateTableEncoder(uShiftTable * aShiftTable, - uMappingTable * aMappingTable, - PRUint32 aMaxLengthFactor, - nsISupports* aOuter, - REFNSIID aIID, - void** aResult) +NS_METHOD +CreateTableEncoder(uShiftTable * aShiftTable, + uMappingTable * aMappingTable, + PRUint32 aMaxLengthFactor, + nsISupports* aOuter, + REFNSIID aIID, + void** aResult) { if (aOuter) return NS_ERROR_NO_AGGREGATION; @@ -116,3 +117,42 @@ nsresult CreateTableEncoder(uShiftTable * aShiftTable, return StabilizedQueryInterface(encoder, aIID, aResult); } + +NS_METHOD +CreateTableDecoder(uShiftTable * aShiftTable, + uMappingTable * aMappingTable, + PRUint32 aMaxLengthFactor, + nsISupports* aOuter, + REFNSIID aIID, + void** aResult) +{ + if (aOuter) + return NS_ERROR_NO_AGGREGATION; + + nsTableDecoderSupport* decoder = + new nsTableDecoderSupport(aShiftTable, aMappingTable, + aMaxLengthFactor); + if (!decoder) + return NS_ERROR_OUT_OF_MEMORY; + + return StabilizedQueryInterface(decoder, aIID, aResult); +} + +NS_METHOD +CreateOneByteDecoder(uShiftTable * aShiftTable, + uMappingTable * aMappingTable, + + nsISupports* aOuter, + REFNSIID aIID, + void** aResult) +{ + if (aOuter) return NS_ERROR_NO_AGGREGATION; + + nsOneByteDecoderSupport* decoder = + new nsOneByteDecoderSupport(aShiftTable, aMappingTable); + + if (!decoder) + return NS_ERROR_OUT_OF_MEMORY; + + return StabilizedQueryInterface(decoder, aIID, aResult); +} diff --git a/intl/uconv/util/nsUCConstructors.h b/intl/uconv/util/nsUCConstructors.h index 9fcce025c67c..abe56d237be6 100644 --- a/intl/uconv/util/nsUCConstructors.h +++ b/intl/uconv/util/nsUCConstructors.h @@ -36,6 +36,9 @@ * * ***** END LICENSE BLOCK ***** */ +#ifndef __nsUCConstructors_h +#define __nsUCConstructors_h + #include "nsIUnicodeEncoder.h" #include "nsIUnicodeDecoder.h" #include "nsIUnicodeEncodeHelper.h" @@ -43,7 +46,7 @@ #include "nsICharRepresentable.h" // all the useful constructors -nsresult +NS_METHOD CreateMultiTableDecoder(PRInt32 aTableCount, uRange * aRangeArray, uShiftTable ** aShiftTable, @@ -54,7 +57,7 @@ CreateMultiTableDecoder(PRInt32 aTableCount, REFNSIID aIID, void** aResult); -nsresult +NS_METHOD CreateMultiTableEncoder(PRInt32 aTableCount, uShiftTable ** aShiftTable, uMappingTable ** aMappingTable, @@ -64,7 +67,7 @@ CreateMultiTableEncoder(PRInt32 aTableCount, REFNSIID aIID, void** aResult); -nsresult +NS_METHOD CreateTableEncoder(uShiftTable * aShiftTable, uMappingTable * aMappingTable, PRUint32 aMaxLengthFactor, @@ -72,3 +75,23 @@ CreateTableEncoder(uShiftTable * aShiftTable, nsISupports* aOuter, REFNSIID aIID, void** aResult); + +NS_METHOD +CreateTableDecoder(uShiftTable * aShiftTable, + uMappingTable * aMappingTable, + PRUint32 aMaxLengthFactor, + + nsISupports* aOuter, + REFNSIID aIID, + void** aResult); + +NS_METHOD +CreateOneByteDecoder(uShiftTable * aShiftTable, + uMappingTable * aMappingTable, + + nsISupports* aOuter, + REFNSIID aIID, + void** aResult); + + +#endif diff --git a/intl/uconv/util/nsUCRegUtils.cpp b/intl/uconv/util/nsUCRegUtils.cpp index b0c158eb868d..484febd88e32 100644 --- a/intl/uconv/util/nsUCRegUtils.cpp +++ b/intl/uconv/util/nsUCRegUtils.cpp @@ -44,8 +44,23 @@ #include "nsXPIDLString.h" #include "nsICharsetConverterManager.h" #include "nsCRT.h" +#include "prprf.h" -nsresult nsRegisterConverters(nsConverterInfo* regInfo, +static const char gIDFormat[] = + "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}"; + +static void +make_cid_string(char* buf, size_t size, const nsCID& cid) +{ + PR_snprintf(buf, size, gIDFormat, + cid.m0, (PRUint32) cid.m1, (PRUint32) cid.m2, + (PRUint32) cid.m3[0], (PRUint32) cid.m3[1], + (PRUint32) cid.m3[2], (PRUint32) cid.m3[3], + (PRUint32) cid.m3[4], (PRUint32) cid.m3[5], + (PRUint32) cid.m3[6], (PRUint32) cid.m3[7]); +} + +nsresult nsRegisterConverters(const nsConverterInfo* regInfo, PRUint32 aCount) { nsresult rv; @@ -56,18 +71,21 @@ nsresult nsRegisterConverters(nsConverterInfo* regInfo, nsXPIDLCString previous; PRUint32 i; for (i=0; iisEncoder) { + if (entry.isEncoder) { category = NS_UNICODEENCODER_NAME; } else { category = NS_UNICODEDECODER_NAME; } - key = entry->charset; + key = entry.charset; - rv = catman->AddCategoryEntry(category, key, "", + // stolen from nsID::ToString, making it stack-based + char value[40]; + make_cid_string(value, 40, entry.cid); + rv = catman->AddCategoryEntry(category, key, value, PR_TRUE, PR_TRUE, getter_Copies(previous)); @@ -75,7 +93,8 @@ nsresult nsRegisterConverters(nsConverterInfo* regInfo, return rv; } -nsresult nsUnregisterConverters(nsConverterInfo* regInfo, PRUint32 aCount) +nsresult nsUnregisterConverters(const nsConverterInfo* regInfo, + PRUint32 aCount) { nsresult rv; nsCOMPtr catman = @@ -85,21 +104,18 @@ nsresult nsUnregisterConverters(nsConverterInfo* regInfo, PRUint32 aCount) nsXPIDLCString previous; PRUint32 i; for (i=0; iisEncoder) { + if (entry.isEncoder) { category = NS_UNICODEDECODER_NAME; } else { category = NS_UNICODEENCODER_NAME; } - key = entry->charset; - - char * value = entry->cid.ToString(); + key = entry.charset; rv = catman->DeleteCategoryEntry(category, key, PR_TRUE); - CRTFREEIF(value); } return rv; }