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
f20bafad
Kaydet (Commit)
f20bafad
authored
Eyl 17, 2011
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
ditch ByteString::Expand
üst
98f84dfa
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
34 deletions
+31
-34
string.hxx
tools/inc/tools/string.hxx
+0
-3
strimp.cxx
tools/source/string/strimp.cxx
+0
-31
tustring.cxx
tools/source/string/tustring.cxx
+31
-0
No files found.
tools/inc/tools/string.hxx
Dosyayı görüntüle @
f20bafad
...
@@ -177,7 +177,6 @@ private:
...
@@ -177,7 +177,6 @@ private:
// Append(char)
// Append(char)
void
operator
+=
(
int
);
// not implemented; to detect misuses
void
operator
+=
(
int
);
// not implemented; to detect misuses
// of operator +=(sal_Char)
// of operator +=(sal_Char)
public
:
public
:
ByteString
();
ByteString
();
ByteString
(
const
ByteString
&
rStr
);
ByteString
(
const
ByteString
&
rStr
);
...
@@ -234,8 +233,6 @@ public:
...
@@ -234,8 +233,6 @@ public:
ByteString
&
Erase
(
xub_StrLen
nIndex
=
0
,
xub_StrLen
nCount
=
STRING_LEN
);
ByteString
&
Erase
(
xub_StrLen
nIndex
=
0
,
xub_StrLen
nCount
=
STRING_LEN
);
ByteString
Copy
(
xub_StrLen
nIndex
=
0
,
xub_StrLen
nCount
=
STRING_LEN
)
const
;
ByteString
Copy
(
xub_StrLen
nIndex
=
0
,
xub_StrLen
nCount
=
STRING_LEN
)
const
;
ByteString
&
Expand
(
xub_StrLen
nCount
,
sal_Char
cExpandChar
=
' '
);
ByteString
&
EraseLeadingChars
(
sal_Char
c
=
' '
);
ByteString
&
EraseLeadingChars
(
sal_Char
c
=
' '
);
ByteString
&
EraseTrailingChars
(
sal_Char
c
=
' '
);
ByteString
&
EraseTrailingChars
(
sal_Char
c
=
' '
);
ByteString
&
EraseLeadingAndTrailingChars
(
sal_Char
c
=
' '
);
ByteString
&
EraseLeadingAndTrailingChars
(
sal_Char
c
=
' '
);
...
...
tools/source/string/strimp.cxx
Dosyayı görüntüle @
f20bafad
...
@@ -769,37 +769,6 @@ STRING& STRING::Erase( xub_StrLen nIndex, xub_StrLen nCount )
...
@@ -769,37 +769,6 @@ STRING& STRING::Erase( xub_StrLen nIndex, xub_StrLen nCount )
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
STRING
&
STRING
::
Expand
(
xub_StrLen
nCount
,
STRCODE
cExpandChar
)
{
DBG_CHKTHIS
(
STRING
,
DBGCHECKSTRING
);
// Muss der String erweitert werden
sal_Int32
nLen
=
mpData
->
mnLen
;
if
(
nCount
<=
nLen
)
return
*
this
;
// Neuen String anlegen
STRINGDATA
*
pNewData
=
ImplAllocData
(
nCount
);
// Alten String kopieren
memcpy
(
pNewData
->
maStr
,
mpData
->
maStr
,
nLen
*
sizeof
(
STRCODE
)
);
// und initialisieren
STRCODE
*
pStr
=
pNewData
->
maStr
;
pStr
+=
nLen
;
for
(
sal_Int32
i
=
nCount
-
nLen
;
i
>
0
;
--
i
)
{
*
pStr
++
=
cExpandChar
;
}
// Alte Daten loeschen und Neue zuweisen
STRING_RELEASE
((
STRING_TYPE
*
)
mpData
);
mpData
=
pNewData
;
return
*
this
;
}
// -----------------------------------------------------------------------
STRING
&
STRING
::
EraseLeadingChars
(
STRCODE
c
)
STRING
&
STRING
::
EraseLeadingChars
(
STRCODE
c
)
{
{
DBG_CHKTHIS
(
STRING
,
DBGCHECKSTRING
);
DBG_CHKTHIS
(
STRING
,
DBGCHECKSTRING
);
...
...
tools/source/string/tustring.cxx
Dosyayı görüntüle @
f20bafad
...
@@ -474,4 +474,35 @@ STRING& STRING::Fill( xub_StrLen nCount, STRCODE cFillChar )
...
@@ -474,4 +474,35 @@ STRING& STRING::Fill( xub_StrLen nCount, STRCODE cFillChar )
return
*
this
;
return
*
this
;
}
}
// -----------------------------------------------------------------------
STRING
&
STRING
::
Expand
(
xub_StrLen
nCount
,
STRCODE
cExpandChar
)
{
DBG_CHKTHIS
(
STRING
,
DBGCHECKSTRING
);
// Muss der String erweitert werden
sal_Int32
nLen
=
mpData
->
mnLen
;
if
(
nCount
<=
nLen
)
return
*
this
;
// Neuen String anlegen
STRINGDATA
*
pNewData
=
ImplAllocData
(
nCount
);
// Alten String kopieren
memcpy
(
pNewData
->
maStr
,
mpData
->
maStr
,
nLen
*
sizeof
(
STRCODE
)
);
// und initialisieren
STRCODE
*
pStr
=
pNewData
->
maStr
;
pStr
+=
nLen
;
for
(
sal_Int32
i
=
nCount
-
nLen
;
i
>
0
;
--
i
)
{
*
pStr
++
=
cExpandChar
;
}
// Alte Daten loeschen und Neue zuweisen
STRING_RELEASE
((
STRING_TYPE
*
)
mpData
);
mpData
=
pNewData
;
return
*
this
;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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