diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-09-01 23:32:48 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-09-02 09:54:17 +0100 |
commit | cd9038dd398db0710273e4be5fb5310ec2f2c642 (patch) | |
tree | 8cd01dd7985c3f04c53dc275af7b64f46d4f67d2 /i18npool | |
parent | a2d55e1869a37247549dc6d126e4cfbbf98ef024 (diff) |
move to comphelper, and rename
Diffstat (limited to 'i18npool')
13 files changed, 23 insertions, 29 deletions
diff --git a/i18npool/inc/transliteration_commonclass.hxx b/i18npool/inc/transliteration_commonclass.hxx index af5d189e6038..826e7366b297 100644 --- a/i18npool/inc/transliteration_commonclass.hxx +++ b/i18npool/inc/transliteration_commonclass.hxx @@ -33,7 +33,6 @@ #include <cppuhelper/implbase1.hxx> #include <rtl/ustrbuf.h> #include <rtl/ustring.hxx> -#include <i18nutil/x_rtl_ustring.h> namespace com { namespace sun { namespace star { namespace i18n { diff --git a/i18npool/source/characterclassification/cclass_unicode.cxx b/i18npool/source/characterclassification/cclass_unicode.cxx index 9acdd9b66d87..f0fde593c0ae 100644 --- a/i18npool/source/characterclassification/cclass_unicode.cxx +++ b/i18npool/source/characterclassification/cclass_unicode.cxx @@ -34,7 +34,7 @@ #include <com/sun/star/i18n/UnicodeType.hpp> #include <com/sun/star/i18n/KCharacterType.hpp> #include <unicode/uchar.h> -#include <i18nutil/x_rtl_ustring.h> +#include <comphelper/string.hxx> #include <breakiteratorImpl.hxx> using namespace ::com::sun::star::uno; @@ -99,7 +99,7 @@ cclass_Unicode::toTitle( const OUString& Text, sal_Int32 nPos, sal_Int32 nCount, nCount = len - nPos; trans->setMappingType(MappingTypeToTitle, rLocale); - rtl_uString* pStr = x_rtl_uString_new_WithLength(nCount); + rtl_uString* pStr = comphelper::string::rtl_uString_alloc(nCount); sal_Unicode* out = pStr->buffer; BreakIteratorImpl brk(xMSF); Boundary bdy = brk.getWordBoundary(Text, nPos, rLocale, diff --git a/i18npool/source/nativenumber/nativenumbersupplier.cxx b/i18npool/source/nativenumber/nativenumbersupplier.cxx index 6d0a1d4efec6..8dbefdc7889f 100644 --- a/i18npool/source/nativenumber/nativenumbersupplier.cxx +++ b/i18npool/source/nativenumber/nativenumbersupplier.cxx @@ -34,7 +34,7 @@ #include <nativenumbersupplier.hxx> #include <localedata.hxx> #include <data/numberchar.h> -#include <i18nutil/x_rtl_ustring.h> +#include <comphelper/string.hxx> using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; @@ -79,7 +79,7 @@ OUString SAL_CALL AsciiToNativeChar( const OUString& inStr, sal_Int32 startPos, Sequence< sal_Int32 >& offset, sal_Bool useOffset, sal_Int16 number ) throw(RuntimeException) { const sal_Unicode *src = inStr.getStr() + startPos; - rtl_uString *newStr = x_rtl_uString_new_WithLength(nCount); + rtl_uString *newStr = comphelper::string::rtl_uString_alloc(nCount); if (useOffset) offset.realloc(nCount); diff --git a/i18npool/source/textconversion/textconversion_ko.cxx b/i18npool/source/textconversion/textconversion_ko.cxx index 9cdc070ff6bf..9a743e829506 100644 --- a/i18npool/source/textconversion/textconversion_ko.cxx +++ b/i18npool/source/textconversion/textconversion_ko.cxx @@ -35,7 +35,6 @@ #include <com/sun/star/linguistic2/ConversionDirection.hpp> #include <com/sun/star/linguistic2/ConversionDictionaryType.hpp> #include <rtl/ustrbuf.hxx> -#include <i18nutil/x_rtl_ustring.h> #include <unicode/uchar.h> using namespace com::sun::star::lang; diff --git a/i18npool/source/textconversion/textconversion_zh.cxx b/i18npool/source/textconversion/textconversion_zh.cxx index 507f10221e33..bbe6b5d92b5f 100644 --- a/i18npool/source/textconversion/textconversion_zh.cxx +++ b/i18npool/source/textconversion/textconversion_zh.cxx @@ -35,7 +35,7 @@ #include <com/sun/star/i18n/TextConversionOption.hpp> #include <com/sun/star/linguistic2/ConversionDirection.hpp> #include <com/sun/star/linguistic2/ConversionDictionaryType.hpp> -#include <i18nutil/x_rtl_ustring.h> +#include <comphelper/string.hxx> using namespace com::sun::star::lang; using namespace com::sun::star::i18n; @@ -86,7 +86,7 @@ TextConversion_zh::getCharConversion(const OUString& aText, sal_Int32 nStartPos, Index = ((const sal_uInt16* (*)())getFunctionBySymbol("getSTC_CharIndex_S2T"))(); } - rtl_uString * newStr = x_rtl_uString_new_WithLength(nLength); + rtl_uString * newStr = comphelper::string::rtl_uString_alloc(nLength); for (sal_Int32 i = 0; i < nLength; i++) newStr->buffer[i] = getOneCharConversion(aText[nStartPos+i], Data, Index); diff --git a/i18npool/source/transliteration/ignoreIandEfollowedByYa_ja_JP.cxx b/i18npool/source/transliteration/ignoreIandEfollowedByYa_ja_JP.cxx index 15395d4a0b7b..bcc25f84de3c 100644 --- a/i18npool/source/transliteration/ignoreIandEfollowedByYa_ja_JP.cxx +++ b/i18npool/source/transliteration/ignoreIandEfollowedByYa_ja_JP.cxx @@ -29,9 +29,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_i18npool.hxx" -// prevent internal compiler error with MSVC6SP3 #include <utility> - +#include <comphelper/string.hxx> #include <i18nutil/oneToOneMapping.hxx> #define TRANSLITERATION_IandEfollowedByYa_ja_JP #include <transliteration_Ignore.hxx> @@ -88,7 +87,7 @@ ignoreIandEfollowedByYa_ja_JP::folding( const OUString& inStr, sal_Int32 startPo { // Create a string buffer which can hold nCount + 1 characters. // The reference count is 1 now. - rtl_uString * newStr = x_rtl_uString_new_WithLength(nCount); + rtl_uString * newStr = comphelper::string::rtl_uString_alloc(nCount); sal_Unicode * dst = newStr->buffer; const sal_Unicode * src = inStr.getStr() + startPos; diff --git a/i18npool/source/transliteration/ignoreIterationMark_ja_JP.cxx b/i18npool/source/transliteration/ignoreIterationMark_ja_JP.cxx index cc79da1dc528..8d28c82e553f 100644 --- a/i18npool/source/transliteration/ignoreIterationMark_ja_JP.cxx +++ b/i18npool/source/transliteration/ignoreIterationMark_ja_JP.cxx @@ -29,9 +29,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_i18npool.hxx" -// prevent internal compiler error with MSVC6SP3 #include <utility> - +#include <comphelper/string.hxx> #include <i18nutil/oneToOneMapping.hxx> #define TRANSLITERATION_IterationMark_ja_JP #include <transliteration_Ignore.hxx> @@ -103,7 +102,7 @@ ignoreIterationMark_ja_JP::folding( const OUString& inStr, sal_Int32 startPos, s // Create a string buffer which can hold nCount + 1 characters. // The reference count is 1 now. - rtl_uString * newStr = x_rtl_uString_new_WithLength(nCount); + rtl_uString * newStr = comphelper::string::rtl_uString_alloc(nCount); sal_Unicode * dst = newStr->buffer; const sal_Unicode * src = inStr.getStr() + startPos; diff --git a/i18npool/source/transliteration/ignoreKiKuFollowedBySa_ja_JP.cxx b/i18npool/source/transliteration/ignoreKiKuFollowedBySa_ja_JP.cxx index 57abcff573aa..f27e02e49a37 100644 --- a/i18npool/source/transliteration/ignoreKiKuFollowedBySa_ja_JP.cxx +++ b/i18npool/source/transliteration/ignoreKiKuFollowedBySa_ja_JP.cxx @@ -29,9 +29,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_i18npool.hxx" -// prevent internal compiler error with MSVC6SP3 #include <utility> - +#include <comphelper/string.hxx> #define TRANSLITERATION_KiKuFollowedBySa_ja_JP #include <transliteration_Ignore.hxx> @@ -48,7 +47,7 @@ ignoreKiKuFollowedBySa_ja_JP::folding( const OUString& inStr, sal_Int32 startPos { // Create a string buffer which can hold nCount + 1 characters. // The reference count is 1 now. - rtl_uString * newStr = x_rtl_uString_new_WithLength(nCount); + rtl_uString * newStr = comphelper::string::rtl_uString_alloc(nCount); sal_Unicode * dst = newStr->buffer; const sal_Unicode * src = inStr.getStr() + startPos; diff --git a/i18npool/source/transliteration/ignoreProlongedSoundMark_ja_JP.cxx b/i18npool/source/transliteration/ignoreProlongedSoundMark_ja_JP.cxx index fd309ec6527b..85dcdb418bc9 100644 --- a/i18npool/source/transliteration/ignoreProlongedSoundMark_ja_JP.cxx +++ b/i18npool/source/transliteration/ignoreProlongedSoundMark_ja_JP.cxx @@ -29,9 +29,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_i18npool.hxx" -// prevent internal compiler error with MSVC6SP3 #include <utility> - +#include <comphelper/string.hxx> #define TRANSLITERATION_ProlongedSoundMark_ja_JP #include <transliteration_Ignore.hxx> @@ -310,7 +309,7 @@ ignoreProlongedSoundMark_ja_JP::folding( const OUString& inStr, sal_Int32 startP { // Create a string buffer which can hold nCount + 1 characters. // The reference count is 1 now. - rtl_uString * newStr = x_rtl_uString_new_WithLength(nCount); + rtl_uString * newStr = comphelper::string::rtl_uString_alloc(nCount); sal_Unicode * dst = newStr->buffer; const sal_Unicode * src = inStr.getStr() + startPos; diff --git a/i18npool/source/transliteration/transliteration_Ignore.cxx b/i18npool/source/transliteration/transliteration_Ignore.cxx index 3d812722df65..0d60b2894735 100644 --- a/i18npool/source/transliteration/transliteration_Ignore.cxx +++ b/i18npool/source/transliteration/transliteration_Ignore.cxx @@ -29,9 +29,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_i18npool.hxx" -// prevent internal compiler error with MSVC6SP3 #include <utility> - +#include <comphelper/string.hxx> #include <transliteration_Ignore.hxx> using namespace com::sun::star::uno; @@ -138,7 +137,7 @@ transliteration_Ignore::folding( const OUString& inStr, sal_Int32 startPos, { // Create a string buffer which can hold nCount + 1 characters. // The reference count is 1 now. - rtl_uString * newStr = x_rtl_uString_new_WithLength(nCount); + rtl_uString * newStr = comphelper::string::rtl_uString_alloc(nCount); sal_Unicode * dst = newStr->buffer; const sal_Unicode * src = inStr.getStr() + startPos; diff --git a/i18npool/source/transliteration/transliteration_Numeric.cxx b/i18npool/source/transliteration/transliteration_Numeric.cxx index f2250fb0b4e4..9ef5cd51370f 100644 --- a/i18npool/source/transliteration/transliteration_Numeric.cxx +++ b/i18npool/source/transliteration/transliteration_Numeric.cxx @@ -32,6 +32,7 @@ #include <transliteration_Numeric.hxx> #include <nativenumbersupplier.hxx> #include <defaultnumberingprovider.hxx> +#include <comphelper/string.hxx> using namespace com::sun::star::uno; @@ -78,7 +79,7 @@ transliteration_Numeric::transliterateBullet( const OUString& inStr, sal_Int32 s if (endPos > inStr.getLength()) endPos = inStr.getLength(); - rtl_uString* pStr = x_rtl_uString_new_WithLength(nCount); + rtl_uString* pStr = comphelper::string::rtl_uString_alloc(nCount); sal_Unicode* out = pStr->buffer; if (useOffset) diff --git a/i18npool/source/transliteration/transliteration_OneToOne.cxx b/i18npool/source/transliteration/transliteration_OneToOne.cxx index 26f0732d514c..95c73189dd29 100644 --- a/i18npool/source/transliteration/transliteration_OneToOne.cxx +++ b/i18npool/source/transliteration/transliteration_OneToOne.cxx @@ -29,9 +29,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_i18npool.hxx" -// prevent internal compiler error with MSVC6SP3 #include <utility> - +#include <comphelper/string.hxx> #include <transliteration_OneToOne.hxx> using namespace com::sun::star::uno; @@ -75,7 +74,7 @@ transliteration_OneToOne::transliterate( const OUString& inStr, sal_Int32 startP { // Create a string buffer which can hold nCount + 1 characters. // The reference count is 1 now. - rtl_uString * newStr = x_rtl_uString_new_WithLength(nCount); + rtl_uString * newStr = comphelper::string::rtl_uString_alloc(nCount); sal_Unicode * dst = newStr->buffer; const sal_Unicode * src = inStr.getStr() + startPos; diff --git a/i18npool/source/transliteration/transliteration_body.cxx b/i18npool/source/transliteration/transliteration_body.cxx index 294f0a1f89a9..dcc659a07e12 100644 --- a/i18npool/source/transliteration/transliteration_body.cxx +++ b/i18npool/source/transliteration/transliteration_body.cxx @@ -34,6 +34,7 @@ #include <i18nutil/unicode.hxx> #include <comphelper/processfactory.hxx> +#include <comphelper/string.hxx> #include <osl/diagnose.h> #include <string.h> @@ -129,7 +130,7 @@ Transliteration_body::transliterate( const Mapping &map = casefolding::getValue( in, i, nCount, aLocale, nTmpMappingType ); nOffCount += map.nmap; } - rtl_uString* pStr = x_rtl_uString_new_WithLength(nOffCount); + rtl_uString* pStr = comphelper::string::rtl_uString_alloc(nOffCount); sal_Unicode* out = pStr->buffer; if ( nOffCount != offset.getLength() ) @@ -199,7 +200,7 @@ OUString SAL_CALL Transliteration_body::transliterateChar2String( sal_Unicode inChar ) throw(RuntimeException) { const Mapping &map = casefolding::getValue(&inChar, 0, 1, aLocale, nMappingType); - rtl_uString* pStr = x_rtl_uString_new_WithLength(map.nmap); + rtl_uString* pStr = comphelper::string::rtl_uString_alloc(map.nmap); sal_Unicode* out = pStr->buffer; sal_Int32 i; |