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
7ba33735
Kaydet (Commit)
7ba33735
authored
Agu 23, 2011
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
merge these similar methods together
üst
050b80a6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
18 deletions
+10
-18
x_rtl_ustring.h
i18nutil/inc/i18nutil/x_rtl_ustring.h
+9
-16
widthfolding.cxx
i18nutil/source/utility/widthfolding.cxx
+1
-2
No files found.
i18nutil/inc/i18nutil/x_rtl_ustring.h
Dosyayı görüntüle @
7ba33735
...
...
@@ -28,30 +28,23 @@
#ifndef INCLUDED_I18NUTIL_X_RTL_USTRING_H
#define INCLUDED_I18NUTIL_X_RTL_USTRING_H
#ifndef _RTL_STRING_HXX_
#include <rtl/strbuf.hxx>
#endif
#include <rtl/memory.h>
#include <rtl/alloc.h>
#include "i18nutildllapi.h"
/**
* Allocates a new <code>rtl_uString</code> which can hold nLen + 1 characters.
* The reference count is 0. The characters of room is not cleared.
* This method is similar to rtl_uString_new_WithLength in rtl/ustring.h, but
* can allocate a new string more efficiently. You need to "acquire" by such as
* OUString( rtl_uString * value ) if you intend to use it for a while.
* @param [output] newStr
* @param [input] nLen
* Allocates a new <code>rtl_uString</code> with capacity of nLen + 1
* characters.
*
* The reference count is 0. The characters of the capacity are not cleared,
* unlike the similar method of rtl_uString_new_WithLength in rtl/ustring.h, so
* is more efficient for allocating a new string. You need to "acquire" by such
* as OUString( rtl_uString * value ) if you intend to use it for a while.
* @param nLen
* @return newStr
*/
I18NUTIL_DLLPUBLIC
inline
void
SAL_CALL
x_rtl_uString_new_WithLength
(
rtl_uString
**
newStr
,
sal_Int32
nLen
,
sal_Int32
_refCount
=
0
)
{
*
newStr
=
(
rtl_uString
*
)
rtl_allocateMemory
(
sizeof
(
rtl_uString
)
+
sizeof
(
sal_Unicode
)
*
nLen
);
(
*
newStr
)
->
refCount
=
_refCount
;
(
*
newStr
)
->
length
=
nLen
;
}
I18NUTIL_DLLPUBLIC
inline
rtl_uString
*
SAL_CALL
x_rtl_uString_new_WithLength
(
sal_Int32
nLen
,
sal_Int32
_refCount
=
0
)
{
rtl_uString
*
newStr
=
(
rtl_uString
*
)
rtl_allocateMemory
(
sizeof
(
rtl_uString
)
+
sizeof
(
sal_Unicode
)
*
nLen
);
...
...
i18nutil/source/utility/widthfolding.cxx
Dosyayı görüntüle @
7ba33735
...
...
@@ -55,8 +55,7 @@ OUString widthfolding::decompose_ja_voiced_sound_marks (const OUString& inStr, s
{
// Create a string buffer which can hold nCount * 2 + 1 characters.
// Its size may become double of nCount.
rtl_uString
*
newStr
;
x_rtl_uString_new_WithLength
(
&
newStr
,
nCount
*
2
);
// defined in x_rtl_ustring.h The reference count is 0 now.
rtl_uString
*
newStr
=
x_rtl_uString_new_WithLength
(
nCount
*
2
);
// defined in x_rtl_ustring.h The reference count is 0 now.
sal_Int32
*
p
=
NULL
;
sal_Int32
position
=
0
;
...
...
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