Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
cd9038dd
Kaydet (Commit)
cd9038dd
authored
Eyl 01, 2011
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
move to comphelper, and rename
üst
a2d55e18
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
93 additions
and
34 deletions
+93
-34
string.hxx
comphelper/inc/comphelper/string.hxx
+66
-0
transliteration_commonclass.hxx
i18npool/inc/transliteration_commonclass.hxx
+0
-1
cclass_unicode.cxx
i18npool/source/characterclassification/cclass_unicode.cxx
+2
-2
nativenumbersupplier.cxx
i18npool/source/nativenumber/nativenumbersupplier.cxx
+2
-2
textconversion_ko.cxx
i18npool/source/textconversion/textconversion_ko.cxx
+0
-1
textconversion_zh.cxx
i18npool/source/textconversion/textconversion_zh.cxx
+2
-2
ignoreIandEfollowedByYa_ja_JP.cxx
.../source/transliteration/ignoreIandEfollowedByYa_ja_JP.cxx
+2
-3
ignoreIterationMark_ja_JP.cxx
...pool/source/transliteration/ignoreIterationMark_ja_JP.cxx
+2
-3
ignoreKiKuFollowedBySa_ja_JP.cxx
...l/source/transliteration/ignoreKiKuFollowedBySa_ja_JP.cxx
+2
-3
ignoreProlongedSoundMark_ja_JP.cxx
...source/transliteration/ignoreProlongedSoundMark_ja_JP.cxx
+2
-3
transliteration_Ignore.cxx
i18npool/source/transliteration/transliteration_Ignore.cxx
+2
-3
transliteration_Numeric.cxx
i18npool/source/transliteration/transliteration_Numeric.cxx
+2
-1
transliteration_OneToOne.cxx
i18npool/source/transliteration/transliteration_OneToOne.cxx
+2
-3
transliteration_body.cxx
i18npool/source/transliteration/transliteration_body.cxx
+3
-2
Package_inc.mk
i18nutil/Package_inc.mk
+0
-1
build.lst
i18nutil/prj/build.lst
+1
-1
widthfolding.cxx
i18nutil/source/utility/widthfolding.cxx
+3
-3
No files found.
comphelper/inc/comphelper/string.hxx
Dosyayı görüntüle @
cd9038dd
...
@@ -46,6 +46,72 @@ namespace rtl { class OUString; }
...
@@ -46,6 +46,72 @@ namespace rtl { class OUString; }
// go into the stable URE API:
// go into the stable URE API:
namespace
comphelper
{
namespace
string
{
namespace
comphelper
{
namespace
string
{
namespace
detail
{
template
<
typename
T
,
typename
U
>
T
*
string_alloc
(
sal_Int32
nLen
)
{
//Clearly this is somewhat cosy with the sal implmentation
//rtl_[u]String contains U buffer[1], so an input of nLen
//allocates a buffer of nLen + 1 and we'll ensure a null termination
T
*
newStr
=
(
T
*
)
rtl_allocateMemory
(
sizeof
(
T
)
+
sizeof
(
U
)
*
nLen
);
newStr
->
refCount
=
1
;
newStr
->
length
=
nLen
;
newStr
->
buffer
[
nLen
]
=
0
;
return
newStr
;
}
}
/** Allocate a new string containing space for a given number of characters.
The reference count of the new string will be 1. The length of the string
will be nLen. This function does not handle out-of-memory conditions.
The characters of the capacity are not cleared, and the length is set to
nLen, unlike the similar method of rtl_uString_new_WithLength which
zeros out the buffer, and sets the length to 0. So should be somewhat
more efficient for allocating a new string.
call rtl_uString_release to release the string
alternatively pass ownership to an OUString with
rtl::OUString(newStr, SAL_NO_ACQUIRE);
@param newStr
pointer to the new string.
@param len
the number of characters.
*/
COMPHELPER_DLLPUBLIC
inline
rtl_uString
*
SAL_CALL
rtl_uString_alloc
(
sal_Int32
nLen
)
{
return
detail
::
string_alloc
<
rtl_uString
,
sal_Unicode
>
(
nLen
);
}
/** Allocate a new string containing space for a given number of characters.
The reference count of the new string will be 1. The length of the string
will be nLen. This function does not handle out-of-memory conditions.
The characters of the capacity are not cleared, and the length is set to
nLen, unlike the similar method of rtl_String_new_WithLength which
zeros out the buffer, and sets the length to 0. So should be somewhat
more efficient for allocating a new string.
call rtl_String_release to release the string
alternatively pass ownership to an OUString with
rtl::OUString(newStr, SAL_NO_ACQUIRE);
@param newStr
pointer to the new string.
@param len
the number of characters.
*/
COMPHELPER_DLLPUBLIC
inline
rtl_String
*
SAL_CALL
rtl_string_alloc
(
sal_Int32
nLen
)
{
return
detail
::
string_alloc
<
rtl_String
,
sal_Char
>
(
nLen
);
}
/**
/**
Replace the first occurrence of a substring with another string.
Replace the first occurrence of a substring with another string.
...
...
i18npool/inc/transliteration_commonclass.hxx
Dosyayı görüntüle @
cd9038dd
...
@@ -33,7 +33,6 @@
...
@@ -33,7 +33,6 @@
#include <cppuhelper/implbase1.hxx>
#include <cppuhelper/implbase1.hxx>
#include <rtl/ustrbuf.h>
#include <rtl/ustrbuf.h>
#include <rtl/ustring.hxx>
#include <rtl/ustring.hxx>
#include <i18nutil/x_rtl_ustring.h>
namespace
com
{
namespace
sun
{
namespace
star
{
namespace
i18n
{
namespace
com
{
namespace
sun
{
namespace
star
{
namespace
i18n
{
...
...
i18npool/source/characterclassification/cclass_unicode.cxx
Dosyayı görüntüle @
cd9038dd
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
#include <com/sun/star/i18n/UnicodeType.hpp>
#include <com/sun/star/i18n/UnicodeType.hpp>
#include <com/sun/star/i18n/KCharacterType.hpp>
#include <com/sun/star/i18n/KCharacterType.hpp>
#include <unicode/uchar.h>
#include <unicode/uchar.h>
#include <
i18nutil/x_rtl_ustring.h
>
#include <
comphelper/string.hxx
>
#include <breakiteratorImpl.hxx>
#include <breakiteratorImpl.hxx>
using
namespace
::
com
::
sun
::
star
::
uno
;
using
namespace
::
com
::
sun
::
star
::
uno
;
...
@@ -99,7 +99,7 @@ cclass_Unicode::toTitle( const OUString& Text, sal_Int32 nPos, sal_Int32 nCount,
...
@@ -99,7 +99,7 @@ cclass_Unicode::toTitle( const OUString& Text, sal_Int32 nPos, sal_Int32 nCount,
nCount
=
len
-
nPos
;
nCount
=
len
-
nPos
;
trans
->
setMappingType
(
MappingTypeToTitle
,
rLocale
);
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
;
sal_Unicode
*
out
=
pStr
->
buffer
;
BreakIteratorImpl
brk
(
xMSF
);
BreakIteratorImpl
brk
(
xMSF
);
Boundary
bdy
=
brk
.
getWordBoundary
(
Text
,
nPos
,
rLocale
,
Boundary
bdy
=
brk
.
getWordBoundary
(
Text
,
nPos
,
rLocale
,
...
...
i18npool/source/nativenumber/nativenumbersupplier.cxx
Dosyayı görüntüle @
cd9038dd
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
#include <nativenumbersupplier.hxx>
#include <nativenumbersupplier.hxx>
#include <localedata.hxx>
#include <localedata.hxx>
#include <data/numberchar.h>
#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
::
uno
;
using
namespace
::
com
::
sun
::
star
::
lang
;
using
namespace
::
com
::
sun
::
star
::
lang
;
...
@@ -79,7 +79,7 @@ OUString SAL_CALL AsciiToNativeChar( const OUString& inStr, sal_Int32 startPos,
...
@@ -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
)
Sequence
<
sal_Int32
>&
offset
,
sal_Bool
useOffset
,
sal_Int16
number
)
throw
(
RuntimeException
)
{
{
const
sal_Unicode
*
src
=
inStr
.
getStr
()
+
startPos
;
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
)
if
(
useOffset
)
offset
.
realloc
(
nCount
);
offset
.
realloc
(
nCount
);
...
...
i18npool/source/textconversion/textconversion_ko.cxx
Dosyayı görüntüle @
cd9038dd
...
@@ -35,7 +35,6 @@
...
@@ -35,7 +35,6 @@
#include <com/sun/star/linguistic2/ConversionDirection.hpp>
#include <com/sun/star/linguistic2/ConversionDirection.hpp>
#include <com/sun/star/linguistic2/ConversionDictionaryType.hpp>
#include <com/sun/star/linguistic2/ConversionDictionaryType.hpp>
#include <rtl/ustrbuf.hxx>
#include <rtl/ustrbuf.hxx>
#include <i18nutil/x_rtl_ustring.h>
#include <unicode/uchar.h>
#include <unicode/uchar.h>
using
namespace
com
::
sun
::
star
::
lang
;
using
namespace
com
::
sun
::
star
::
lang
;
...
...
i18npool/source/textconversion/textconversion_zh.cxx
Dosyayı görüntüle @
cd9038dd
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
#include <com/sun/star/i18n/TextConversionOption.hpp>
#include <com/sun/star/i18n/TextConversionOption.hpp>
#include <com/sun/star/linguistic2/ConversionDirection.hpp>
#include <com/sun/star/linguistic2/ConversionDirection.hpp>
#include <com/sun/star/linguistic2/ConversionDictionaryType.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
::
lang
;
using
namespace
com
::
sun
::
star
::
i18n
;
using
namespace
com
::
sun
::
star
::
i18n
;
...
@@ -86,7 +86,7 @@ TextConversion_zh::getCharConversion(const OUString& aText, sal_Int32 nStartPos,
...
@@ -86,7 +86,7 @@ TextConversion_zh::getCharConversion(const OUString& aText, sal_Int32 nStartPos,
Index
=
((
const
sal_uInt16
*
(
*
)())
getFunctionBySymbol
(
"getSTC_CharIndex_S2T"
))();
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
++
)
for
(
sal_Int32
i
=
0
;
i
<
nLength
;
i
++
)
newStr
->
buffer
[
i
]
=
newStr
->
buffer
[
i
]
=
getOneCharConversion
(
aText
[
nStartPos
+
i
],
Data
,
Index
);
getOneCharConversion
(
aText
[
nStartPos
+
i
],
Data
,
Index
);
...
...
i18npool/source/transliteration/ignoreIandEfollowedByYa_ja_JP.cxx
Dosyayı görüntüle @
cd9038dd
...
@@ -29,9 +29,8 @@
...
@@ -29,9 +29,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_i18npool.hxx"
#include "precompiled_i18npool.hxx"
// prevent internal compiler error with MSVC6SP3
#include <utility>
#include <utility>
#include <comphelper/string.hxx>
#include <i18nutil/oneToOneMapping.hxx>
#include <i18nutil/oneToOneMapping.hxx>
#define TRANSLITERATION_IandEfollowedByYa_ja_JP
#define TRANSLITERATION_IandEfollowedByYa_ja_JP
#include <transliteration_Ignore.hxx>
#include <transliteration_Ignore.hxx>
...
@@ -88,7 +87,7 @@ ignoreIandEfollowedByYa_ja_JP::folding( const OUString& inStr, sal_Int32 startPo
...
@@ -88,7 +87,7 @@ ignoreIandEfollowedByYa_ja_JP::folding( const OUString& inStr, sal_Int32 startPo
{
{
// Create a string buffer which can hold nCount + 1 characters.
// Create a string buffer which can hold nCount + 1 characters.
// The reference count is 1 now.
// 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
;
sal_Unicode
*
dst
=
newStr
->
buffer
;
const
sal_Unicode
*
src
=
inStr
.
getStr
()
+
startPos
;
const
sal_Unicode
*
src
=
inStr
.
getStr
()
+
startPos
;
...
...
i18npool/source/transliteration/ignoreIterationMark_ja_JP.cxx
Dosyayı görüntüle @
cd9038dd
...
@@ -29,9 +29,8 @@
...
@@ -29,9 +29,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_i18npool.hxx"
#include "precompiled_i18npool.hxx"
// prevent internal compiler error with MSVC6SP3
#include <utility>
#include <utility>
#include <comphelper/string.hxx>
#include <i18nutil/oneToOneMapping.hxx>
#include <i18nutil/oneToOneMapping.hxx>
#define TRANSLITERATION_IterationMark_ja_JP
#define TRANSLITERATION_IterationMark_ja_JP
#include <transliteration_Ignore.hxx>
#include <transliteration_Ignore.hxx>
...
@@ -103,7 +102,7 @@ ignoreIterationMark_ja_JP::folding( const OUString& inStr, sal_Int32 startPos, s
...
@@ -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.
// Create a string buffer which can hold nCount + 1 characters.
// The reference count is 1 now.
// 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
;
sal_Unicode
*
dst
=
newStr
->
buffer
;
const
sal_Unicode
*
src
=
inStr
.
getStr
()
+
startPos
;
const
sal_Unicode
*
src
=
inStr
.
getStr
()
+
startPos
;
...
...
i18npool/source/transliteration/ignoreKiKuFollowedBySa_ja_JP.cxx
Dosyayı görüntüle @
cd9038dd
...
@@ -29,9 +29,8 @@
...
@@ -29,9 +29,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_i18npool.hxx"
#include "precompiled_i18npool.hxx"
// prevent internal compiler error with MSVC6SP3
#include <utility>
#include <utility>
#include <comphelper/string.hxx>
#define TRANSLITERATION_KiKuFollowedBySa_ja_JP
#define TRANSLITERATION_KiKuFollowedBySa_ja_JP
#include <transliteration_Ignore.hxx>
#include <transliteration_Ignore.hxx>
...
@@ -48,7 +47,7 @@ ignoreKiKuFollowedBySa_ja_JP::folding( const OUString& inStr, sal_Int32 startPos
...
@@ -48,7 +47,7 @@ ignoreKiKuFollowedBySa_ja_JP::folding( const OUString& inStr, sal_Int32 startPos
{
{
// Create a string buffer which can hold nCount + 1 characters.
// Create a string buffer which can hold nCount + 1 characters.
// The reference count is 1 now.
// 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
;
sal_Unicode
*
dst
=
newStr
->
buffer
;
const
sal_Unicode
*
src
=
inStr
.
getStr
()
+
startPos
;
const
sal_Unicode
*
src
=
inStr
.
getStr
()
+
startPos
;
...
...
i18npool/source/transliteration/ignoreProlongedSoundMark_ja_JP.cxx
Dosyayı görüntüle @
cd9038dd
...
@@ -29,9 +29,8 @@
...
@@ -29,9 +29,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_i18npool.hxx"
#include "precompiled_i18npool.hxx"
// prevent internal compiler error with MSVC6SP3
#include <utility>
#include <utility>
#include <comphelper/string.hxx>
#define TRANSLITERATION_ProlongedSoundMark_ja_JP
#define TRANSLITERATION_ProlongedSoundMark_ja_JP
#include <transliteration_Ignore.hxx>
#include <transliteration_Ignore.hxx>
...
@@ -310,7 +309,7 @@ ignoreProlongedSoundMark_ja_JP::folding( const OUString& inStr, sal_Int32 startP
...
@@ -310,7 +309,7 @@ ignoreProlongedSoundMark_ja_JP::folding( const OUString& inStr, sal_Int32 startP
{
{
// Create a string buffer which can hold nCount + 1 characters.
// Create a string buffer which can hold nCount + 1 characters.
// The reference count is 1 now.
// 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
;
sal_Unicode
*
dst
=
newStr
->
buffer
;
const
sal_Unicode
*
src
=
inStr
.
getStr
()
+
startPos
;
const
sal_Unicode
*
src
=
inStr
.
getStr
()
+
startPos
;
...
...
i18npool/source/transliteration/transliteration_Ignore.cxx
Dosyayı görüntüle @
cd9038dd
...
@@ -29,9 +29,8 @@
...
@@ -29,9 +29,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_i18npool.hxx"
#include "precompiled_i18npool.hxx"
// prevent internal compiler error with MSVC6SP3
#include <utility>
#include <utility>
#include <comphelper/string.hxx>
#include <transliteration_Ignore.hxx>
#include <transliteration_Ignore.hxx>
using
namespace
com
::
sun
::
star
::
uno
;
using
namespace
com
::
sun
::
star
::
uno
;
...
@@ -138,7 +137,7 @@ transliteration_Ignore::folding( const OUString& inStr, sal_Int32 startPos,
...
@@ -138,7 +137,7 @@ transliteration_Ignore::folding( const OUString& inStr, sal_Int32 startPos,
{
{
// Create a string buffer which can hold nCount + 1 characters.
// Create a string buffer which can hold nCount + 1 characters.
// The reference count is 1 now.
// 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
;
sal_Unicode
*
dst
=
newStr
->
buffer
;
const
sal_Unicode
*
src
=
inStr
.
getStr
()
+
startPos
;
const
sal_Unicode
*
src
=
inStr
.
getStr
()
+
startPos
;
...
...
i18npool/source/transliteration/transliteration_Numeric.cxx
Dosyayı görüntüle @
cd9038dd
...
@@ -32,6 +32,7 @@
...
@@ -32,6 +32,7 @@
#include <transliteration_Numeric.hxx>
#include <transliteration_Numeric.hxx>
#include <nativenumbersupplier.hxx>
#include <nativenumbersupplier.hxx>
#include <defaultnumberingprovider.hxx>
#include <defaultnumberingprovider.hxx>
#include <comphelper/string.hxx>
using
namespace
com
::
sun
::
star
::
uno
;
using
namespace
com
::
sun
::
star
::
uno
;
...
@@ -78,7 +79,7 @@ transliteration_Numeric::transliterateBullet( const OUString& inStr, sal_Int32 s
...
@@ -78,7 +79,7 @@ transliteration_Numeric::transliterateBullet( const OUString& inStr, sal_Int32 s
if
(
endPos
>
inStr
.
getLength
())
if
(
endPos
>
inStr
.
getLength
())
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
;
sal_Unicode
*
out
=
pStr
->
buffer
;
if
(
useOffset
)
if
(
useOffset
)
...
...
i18npool/source/transliteration/transliteration_OneToOne.cxx
Dosyayı görüntüle @
cd9038dd
...
@@ -29,9 +29,8 @@
...
@@ -29,9 +29,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_i18npool.hxx"
#include "precompiled_i18npool.hxx"
// prevent internal compiler error with MSVC6SP3
#include <utility>
#include <utility>
#include <comphelper/string.hxx>
#include <transliteration_OneToOne.hxx>
#include <transliteration_OneToOne.hxx>
using
namespace
com
::
sun
::
star
::
uno
;
using
namespace
com
::
sun
::
star
::
uno
;
...
@@ -75,7 +74,7 @@ transliteration_OneToOne::transliterate( const OUString& inStr, sal_Int32 startP
...
@@ -75,7 +74,7 @@ transliteration_OneToOne::transliterate( const OUString& inStr, sal_Int32 startP
{
{
// Create a string buffer which can hold nCount + 1 characters.
// Create a string buffer which can hold nCount + 1 characters.
// The reference count is 1 now.
// 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
;
sal_Unicode
*
dst
=
newStr
->
buffer
;
const
sal_Unicode
*
src
=
inStr
.
getStr
()
+
startPos
;
const
sal_Unicode
*
src
=
inStr
.
getStr
()
+
startPos
;
...
...
i18npool/source/transliteration/transliteration_body.cxx
Dosyayı görüntüle @
cd9038dd
...
@@ -34,6 +34,7 @@
...
@@ -34,6 +34,7 @@
#include <i18nutil/unicode.hxx>
#include <i18nutil/unicode.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/string.hxx>
#include <osl/diagnose.h>
#include <osl/diagnose.h>
#include <string.h>
#include <string.h>
...
@@ -129,7 +130,7 @@ Transliteration_body::transliterate(
...
@@ -129,7 +130,7 @@ Transliteration_body::transliterate(
const
Mapping
&
map
=
casefolding
::
getValue
(
in
,
i
,
nCount
,
aLocale
,
nTmpMappingType
);
const
Mapping
&
map
=
casefolding
::
getValue
(
in
,
i
,
nCount
,
aLocale
,
nTmpMappingType
);
nOffCount
+=
map
.
nmap
;
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
;
sal_Unicode
*
out
=
pStr
->
buffer
;
if
(
nOffCount
!=
offset
.
getLength
()
)
if
(
nOffCount
!=
offset
.
getLength
()
)
...
@@ -199,7 +200,7 @@ OUString SAL_CALL
...
@@ -199,7 +200,7 @@ OUString SAL_CALL
Transliteration_body
::
transliterateChar2String
(
sal_Unicode
inChar
)
throw
(
RuntimeException
)
Transliteration_body
::
transliterateChar2String
(
sal_Unicode
inChar
)
throw
(
RuntimeException
)
{
{
const
Mapping
&
map
=
casefolding
::
getValue
(
&
inChar
,
0
,
1
,
aLocale
,
nMappingType
);
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_Unicode
*
out
=
pStr
->
buffer
;
sal_Int32
i
;
sal_Int32
i
;
...
...
i18nutil/Package_inc.mk
Dosyayı görüntüle @
cd9038dd
...
@@ -32,6 +32,5 @@ $(eval $(call gb_Package_add_file,i18nutil_inc,inc/i18nutil/casefolding.hxx,i18n
...
@@ -32,6 +32,5 @@ $(eval $(call gb_Package_add_file,i18nutil_inc,inc/i18nutil/casefolding.hxx,i18n
$(eval $(call gb_Package_add_file,i18nutil_inc,inc/i18nutil/oneToOneMapping.hxx,i18nutil/oneToOneMapping.hxx))
$(eval $(call gb_Package_add_file,i18nutil_inc,inc/i18nutil/oneToOneMapping.hxx,i18nutil/oneToOneMapping.hxx))
$(eval $(call gb_Package_add_file,i18nutil_inc,inc/i18nutil/unicode.hxx,i18nutil/unicode.hxx))
$(eval $(call gb_Package_add_file,i18nutil_inc,inc/i18nutil/unicode.hxx,i18nutil/unicode.hxx))
$(eval $(call gb_Package_add_file,i18nutil_inc,inc/i18nutil/widthfolding.hxx,i18nutil/widthfolding.hxx))
$(eval $(call gb_Package_add_file,i18nutil_inc,inc/i18nutil/widthfolding.hxx,i18nutil/widthfolding.hxx))
$(eval $(call gb_Package_add_file,i18nutil_inc,inc/i18nutil/x_rtl_ustring.h,i18nutil/x_rtl_ustring.h))
# vim: set noet sw=4:
# vim: set noet sw=4:
i18nutil/prj/build.lst
Dosyayı görüntüle @
cd9038dd
inu i18nutil : sal cppu offapi NULL
inu i18nutil : sal cppu
comphelper
offapi NULL
inu i18nutil\prj nmake - all inu_prj NULL
inu i18nutil\prj nmake - all inu_prj NULL
i18nutil/source/utility/widthfolding.cxx
Dosyayı görüntüle @
cd9038dd
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
// prevent internal compiler error with MSVC6SP3
// prevent internal compiler error with MSVC6SP3
#include <utility>
#include <utility>
#include <i18nutil/widthfolding.hxx>
#include <i18nutil/widthfolding.hxx>
#include <
i18nutil/x_rtl_ustring.h
>
#include <
comphelper/string.hxx
>
#include "widthfolding_data.h"
#include "widthfolding_data.h"
using
namespace
com
::
sun
::
star
::
uno
;
using
namespace
com
::
sun
::
star
::
uno
;
...
@@ -56,7 +56,7 @@ OUString widthfolding::decompose_ja_voiced_sound_marks (const OUString& inStr, s
...
@@ -56,7 +56,7 @@ OUString widthfolding::decompose_ja_voiced_sound_marks (const OUString& inStr, s
// Create a string buffer which can hold nCount * 2 + 1 characters.
// Create a string buffer which can hold nCount * 2 + 1 characters.
// Its size may become double of nCount.
// Its size may become double of nCount.
// The reference count is 1 now.
// The reference count is 1 now.
rtl_uString
*
newStr
=
x_rtl_uString_new_WithLength
(
nCount
*
2
);
rtl_uString
*
newStr
=
comphelper
::
string
::
rtl_uString_alloc
(
nCount
*
2
);
sal_Int32
*
p
=
NULL
;
sal_Int32
*
p
=
NULL
;
sal_Int32
position
=
0
;
sal_Int32
position
=
0
;
...
@@ -118,7 +118,7 @@ OUString widthfolding::compose_ja_voiced_sound_marks (const OUString& inStr, sal
...
@@ -118,7 +118,7 @@ OUString widthfolding::compose_ja_voiced_sound_marks (const OUString& inStr, sal
// Create a string buffer which can hold nCount + 1 characters.
// Create a string buffer which can hold nCount + 1 characters.
// Its size may become equal to nCount or smaller.
// Its size may become equal to nCount or smaller.
// The reference count is 1 now.
// The reference count is 1 now.
rtl_uString
*
newStr
=
x_rtl_uString_new_WithLength
(
nCount
);
rtl_uString
*
newStr
=
comphelper
::
string
::
rtl_uString_alloc
(
nCount
);
// Prepare pointers of unicode character arrays.
// Prepare pointers of unicode character arrays.
const
sal_Unicode
*
src
=
inStr
.
getStr
()
+
startPos
;
const
sal_Unicode
*
src
=
inStr
.
getStr
()
+
startPos
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment