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
53abf4dc
Kaydet (Commit)
53abf4dc
authored
Eyl 20, 2011
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
ByteString->rtl::OString[Buffer]
üst
0344e07d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
35 deletions
+38
-35
dirent.cxx
tools/source/fsys/dirent.cxx
+12
-10
inetmime.cxx
tools/source/inet/inetmime.cxx
+26
-24
debugprint.cxx
tools/source/string/debugprint.cxx
+0
-1
No files found.
tools/source/fsys/dirent.cxx
Dosyayı görüntüle @
53abf4dc
...
@@ -942,7 +942,7 @@ String DirEntry::GetFull( FSysPathStyle eStyle, sal_Bool bWithDelimiter,
...
@@ -942,7 +942,7 @@ String DirEntry::GetFull( FSysPathStyle eStyle, sal_Bool bWithDelimiter,
{
{
DBG_CHKTHIS
(
DirEntry
,
ImpCheckDirEntry
);
DBG_CHKTHIS
(
DirEntry
,
ImpCheckDirEntry
);
ByteString
aRet
;
rtl
::
OStringBuffer
aBuf
;
eStyle
=
GetStyle
(
eStyle
);
eStyle
=
GetStyle
(
eStyle
);
if
(
pParent
)
if
(
pParent
)
{
{
...
@@ -950,31 +950,33 @@ String DirEntry::GetFull( FSysPathStyle eStyle, sal_Bool bWithDelimiter,
...
@@ -950,31 +950,33 @@ String DirEntry::GetFull( FSysPathStyle eStyle, sal_Bool bWithDelimiter,
pParent
->
eFlag
==
FSYS_FLAG_RELROOT
||
pParent
->
eFlag
==
FSYS_FLAG_RELROOT
||
pParent
->
eFlag
==
FSYS_FLAG_VOLUME
)
)
pParent
->
eFlag
==
FSYS_FLAG_VOLUME
)
)
{
{
a
Ret
=
ByteString
(
pParent
->
GetName
(
eStyle
),
osl_getThreadTextEncoding
(
));
a
Buf
.
append
(
rtl
::
OUStringToOString
(
pParent
->
GetName
(
eStyle
),
osl_getThreadTextEncoding
()
));
a
Ret
+=
ByteString
(
GetName
(
eStyle
),
osl_getThreadTextEncoding
(
));
a
Buf
.
append
(
rtl
::
OUStringToOString
(
GetName
(
eStyle
),
osl_getThreadTextEncoding
()
));
}
}
else
else
{
{
a
Ret
=
ByteString
(
pParent
->
GetFull
(
eStyle
),
osl_getThreadTextEncoding
(
));
a
Buf
.
append
(
rtl
::
OUStringToOString
(
pParent
->
GetFull
(
eStyle
),
osl_getThreadTextEncoding
()
));
a
Ret
+=
ACCESSDELIM_C
(
eStyle
);
a
Buf
.
append
(
ACCESSDELIM_C
(
eStyle
)
);
a
Ret
+=
ByteString
(
GetName
(
eStyle
),
osl_getThreadTextEncoding
(
));
a
Buf
.
append
(
rtl
::
OUStringToOString
(
GetName
(
eStyle
),
osl_getThreadTextEncoding
()
));
}
}
}
}
else
else
{
{
a
Ret
=
rtl
::
OUStringToOString
(
GetName
(
eStyle
),
osl_getThreadTextEncoding
(
));
a
Buf
.
append
(
rtl
::
OUStringToOString
(
GetName
(
eStyle
),
osl_getThreadTextEncoding
()
));
}
}
//! Hack
//! Hack
if
(
bWithDelimiter
)
if
(
bWithDelimiter
)
if
(
aRet
.
GetChar
(
aRet
.
Len
()
-
1
)
!=
ACCESSDELIM_C
(
eStyle
)
)
if
(
aBuf
[
aBuf
.
getLength
()
-
1
]
!=
ACCESSDELIM_C
(
eStyle
)
)
aRet
+=
ACCESSDELIM_C
(
eStyle
);
aBuf
.
append
(
ACCESSDELIM_C
(
eStyle
));
rtl
::
OString
aRet
=
aBuf
.
makeStringAndClear
();
//! noch ein Hack
//! noch ein Hack
if
(
nMaxChars
<
STRING_MAXLEN
)
if
(
nMaxChars
<
STRING_MAXLEN
)
aRet
=
ImplCutPath
(
aRet
,
nMaxChars
,
ACCESSDELIM_C
(
eStyle
)
);
aRet
=
ImplCutPath
(
aRet
,
nMaxChars
,
ACCESSDELIM_C
(
eStyle
)
);
return
String
(
aRet
,
osl_getThreadTextEncoding
());
return
rtl
::
OStringToOU
String
(
aRet
,
osl_getThreadTextEncoding
());
}
}
/*************************************************************************
/*************************************************************************
...
...
tools/source/inet/inetmime.cxx
Dosyayı görüntüle @
53abf4dc
...
@@ -32,7 +32,8 @@
...
@@ -32,7 +32,8 @@
#include <cstddef>
#include <cstddef>
#include <limits>
#include <limits>
#include "rtl/tencinfo.h"
#include <rtl/strbuf.hxx>
#include <rtl/tencinfo.h>
#include <tools/datetime.hxx>
#include <tools/datetime.hxx>
#include <tools/inetmime.hxx>
#include <tools/inetmime.hxx>
...
@@ -945,7 +946,7 @@ sal_Char const * INetMIME::scanParameters(sal_Char const * pBegin,
...
@@ -945,7 +946,7 @@ sal_Char const * INetMIME::scanParameters(sal_Char const * pBegin,
ByteString
aCharset
;
ByteString
aCharset
;
ByteString
aLanguage
;
ByteString
aLanguage
;
ByteString
aValue
;
rtl
::
OStringBuffer
aValue
;
if
(
bExtended
)
if
(
bExtended
)
{
{
if
(
nSection
==
0
)
if
(
nSection
==
0
)
...
@@ -1007,6 +1008,7 @@ sal_Char const * INetMIME::scanParameters(sal_Char const * pBegin,
...
@@ -1007,6 +1008,7 @@ sal_Char const * INetMIME::scanParameters(sal_Char const * pBegin,
++
p
;
++
p
;
}
}
if
(
pParameters
)
if
(
pParameters
)
{
while
(
p
!=
pEnd
&&
(
isTokenChar
(
*
p
)
||
!
isUSASCII
(
*
p
)))
while
(
p
!=
pEnd
&&
(
isTokenChar
(
*
p
)
||
!
isUSASCII
(
*
p
)))
{
{
if
(
*
p
==
'%'
)
if
(
*
p
==
'%'
)
...
@@ -1017,19 +1019,21 @@ sal_Char const * INetMIME::scanParameters(sal_Char const * pBegin,
...
@@ -1017,19 +1019,21 @@ sal_Char const * INetMIME::scanParameters(sal_Char const * pBegin,
int
nWeight2
=
getHexWeight
(
p
[
2
]);
int
nWeight2
=
getHexWeight
(
p
[
2
]);
if
(
nWeight1
>=
0
&&
nWeight2
>=
0
)
if
(
nWeight1
>=
0
&&
nWeight2
>=
0
)
{
{
aValue
+=
sal_Char
(
nWeight1
<<
4
|
nWeight2
);
aValue
.
append
(
sal_Char
(
nWeight1
<<
4
|
nWeight2
)
);
p
+=
3
;
p
+=
3
;
continue
;
continue
;
}
}
}
}
}
}
aValue
+=
*
p
++
;
aValue
.
append
(
*
p
++
)
;
}
}
}
else
else
while
(
p
!=
pEnd
&&
(
isTokenChar
(
*
p
)
||
!
isUSASCII
(
*
p
)))
while
(
p
!=
pEnd
&&
(
isTokenChar
(
*
p
)
||
!
isUSASCII
(
*
p
)))
++
p
;
++
p
;
}
}
else
if
(
p
!=
pEnd
&&
*
p
==
'"'
)
else
if
(
p
!=
pEnd
&&
*
p
==
'"'
)
{
if
(
pParameters
)
if
(
pParameters
)
{
{
bool
bInvalid
=
false
;
bool
bInvalid
=
false
;
...
@@ -1060,7 +1064,7 @@ sal_Char const * INetMIME::scanParameters(sal_Char const * pBegin,
...
@@ -1060,7 +1064,7 @@ sal_Char const * INetMIME::scanParameters(sal_Char const * pBegin,
bInvalid
=
true
;
bInvalid
=
true
;
break
;
break
;
}
}
aValue
+=
*
p
++
;
aValue
.
append
(
*
p
++
)
;
}
}
if
(
bInvalid
)
if
(
bInvalid
)
break
;
break
;
...
@@ -1072,6 +1076,7 @@ sal_Char const * INetMIME::scanParameters(sal_Char const * pBegin,
...
@@ -1072,6 +1076,7 @@ sal_Char const * INetMIME::scanParameters(sal_Char const * pBegin,
break
;
break
;
p
=
pStringEnd
;
p
=
pStringEnd
;
}
}
}
else
else
{
{
sal_Char
const
*
pTokenBegin
=
p
;
sal_Char
const
*
pTokenBegin
=
p
;
...
@@ -1080,13 +1085,12 @@ sal_Char const * INetMIME::scanParameters(sal_Char const * pBegin,
...
@@ -1080,13 +1085,12 @@ sal_Char const * INetMIME::scanParameters(sal_Char const * pBegin,
if
(
p
==
pTokenBegin
)
if
(
p
==
pTokenBegin
)
break
;
break
;
if
(
pParameters
)
if
(
pParameters
)
aValue
=
ByteString
(
aValue
.
append
(
pTokenBegin
,
static_cast
<
sal_Int32
>
(
p
-
pTokenBegin
));
pTokenBegin
,
static_cast
<
xub_StrLen
>
(
p
-
pTokenBegin
));
}
}
if
(
!
bPresent
)
if
(
!
bPresent
)
*
pPos
=
new
Parameter
(
*
pPos
,
aAttribute
,
aCharset
,
aLanguage
,
aValue
,
*
pPos
=
new
Parameter
(
*
pPos
,
aAttribute
,
aCharset
,
aLanguage
,
nSection
,
bExtended
);
aValue
.
makeStringAndClear
(),
nSection
,
bExtended
);
}
}
return
parseParameters
(
aList
,
pParameters
)
?
pParameterBegin
:
pBegin
;
return
parseParameters
(
aList
,
pParameters
)
?
pParameterBegin
:
pBegin
;
}
}
...
@@ -2888,7 +2892,7 @@ UniString INetMIME::decodeHeaderFieldBody(HeaderFieldType eType,
...
@@ -2888,7 +2892,7 @@ UniString INetMIME::decodeHeaderFieldBody(HeaderFieldType eType,
bEncodedWord
=
bEncodedWord
&&
q
!=
pEnd
&&
*
q
++
==
'?'
;
bEncodedWord
=
bEncodedWord
&&
q
!=
pEnd
&&
*
q
++
==
'?'
;
ByteString
sText
;
rtl
::
OStringBuffer
sText
;
if
(
bEncodedWord
)
if
(
bEncodedWord
)
{
{
if
(
bEncodingB
)
if
(
bEncodingB
)
...
@@ -2933,10 +2937,8 @@ UniString INetMIME::decodeHeaderFieldBody(HeaderFieldType eType,
...
@@ -2933,10 +2937,8 @@ UniString INetMIME::decodeHeaderFieldBody(HeaderFieldType eType,
}
}
if
(
bEncodedWord
)
if
(
bEncodedWord
)
{
{
for
(
int
nShift
=
16
;
nCount
--
>
0
;
for
(
int
nShift
=
16
;
nCount
--
>
0
;
nShift
-=
8
)
nShift
-=
8
)
sText
.
append
(
sal_Char
(
nValue
>>
nShift
&
0xFF
));
sText
+=
sal_Char
(
nValue
>>
nShift
&
0xFF
);
if
(
*
q
==
'?'
)
if
(
*
q
==
'?'
)
{
{
++
q
;
++
q
;
...
@@ -2982,12 +2984,12 @@ UniString INetMIME::decodeHeaderFieldBody(HeaderFieldType eType,
...
@@ -2982,12 +2984,12 @@ UniString INetMIME::decodeHeaderFieldBody(HeaderFieldType eType,
bDone
=
true
;
bDone
=
true
;
break
;
break
;
}
}
sText
+=
rBody
.
Copy
(
sText
.
append
(
rBody
.
Copy
(
static_cast
<
xub_StrLen
>
(
static_cast
<
xub_StrLen
>
(
pEncodedTextCopyBegin
-
pBegin
),
pEncodedTextCopyBegin
-
pBegin
),
static_cast
<
xub_StrLen
>
(
static_cast
<
xub_StrLen
>
(
q
-
1
-
pEncodedTextCopyBegin
));
q
-
1
-
pEncodedTextCopyBegin
))
)
;
sText
+=
sal_Char
(
nDigit1
<<
4
|
nDigit2
);
sText
.
append
(
sal_Char
(
nDigit1
<<
4
|
nDigit2
)
);
q
+=
2
;
q
+=
2
;
pEncodedTextCopyBegin
=
q
;
pEncodedTextCopyBegin
=
q
;
break
;
break
;
...
@@ -2995,23 +2997,23 @@ UniString INetMIME::decodeHeaderFieldBody(HeaderFieldType eType,
...
@@ -2995,23 +2997,23 @@ UniString INetMIME::decodeHeaderFieldBody(HeaderFieldType eType,
case
'?'
:
case
'?'
:
if
(
q
-
pEncodedTextBegin
>
1
)
if
(
q
-
pEncodedTextBegin
>
1
)
sText
+=
rBody
.
Copy
(
sText
.
append
(
rBody
.
Copy
(
static_cast
<
xub_StrLen
>
(
static_cast
<
xub_StrLen
>
(
pEncodedTextCopyBegin
-
pBegin
),
pEncodedTextCopyBegin
-
pBegin
),
static_cast
<
xub_StrLen
>
(
static_cast
<
xub_StrLen
>
(
q
-
1
-
pEncodedTextCopyBegin
));
q
-
1
-
pEncodedTextCopyBegin
))
)
;
else
else
bEncodedWord
=
false
;
bEncodedWord
=
false
;
bDone
=
true
;
bDone
=
true
;
break
;
break
;
case
'_'
:
case
'_'
:
sText
+=
rBody
.
Copy
(
sText
.
append
(
rBody
.
Copy
(
static_cast
<
xub_StrLen
>
(
static_cast
<
xub_StrLen
>
(
pEncodedTextCopyBegin
-
pBegin
),
pEncodedTextCopyBegin
-
pBegin
),
static_cast
<
xub_StrLen
>
(
static_cast
<
xub_StrLen
>
(
q
-
1
-
pEncodedTextCopyBegin
));
q
-
1
-
pEncodedTextCopyBegin
))
)
;
sText
+=
' '
;
sText
.
append
(
' '
)
;
pEncodedTextCopyBegin
=
q
;
pEncodedTextCopyBegin
=
q
;
break
;
break
;
...
@@ -3051,8 +3053,8 @@ UniString INetMIME::decodeHeaderFieldBody(HeaderFieldType eType,
...
@@ -3051,8 +3053,8 @@ UniString INetMIME::decodeHeaderFieldBody(HeaderFieldType eType,
if
(
bEncodedWord
)
if
(
bEncodedWord
)
{
{
pUnicodeBuffer
pUnicodeBuffer
=
convertToUnicode
(
sText
.
GetBuffe
r
(),
=
convertToUnicode
(
sText
.
getSt
r
(),
sText
.
GetBuffer
()
+
sText
.
Len
(),
sText
.
getStr
()
+
sText
.
getLength
(),
eCharsetEncoding
,
nUnicodeSize
);
eCharsetEncoding
,
nUnicodeSize
);
if
(
pUnicodeBuffer
==
0
)
if
(
pUnicodeBuffer
==
0
)
bEncodedWord
=
false
;
bEncodedWord
=
false
;
...
...
tools/source/string/debugprint.cxx
Dosyayı görüntüle @
53abf4dc
...
@@ -37,7 +37,6 @@ const sal_Char *dbg_dump(const ByteString &rStr)
...
@@ -37,7 +37,6 @@ const sal_Char *dbg_dump(const ByteString &rStr)
{
{
static
ByteString
aStr
;
static
ByteString
aStr
;
aStr
=
rStr
;
aStr
=
rStr
;
aStr
.
Append
(
static_cast
<
char
>
(
0
));
return
aStr
.
GetBuffer
();
return
aStr
.
GetBuffer
();
}
}
...
...
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