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
04a32c98
Kaydet (Commit)
04a32c98
authored
Ock 27, 2012
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
use assert to demo equivalence
üst
f75694e5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
types.cxx
idl/source/objects/types.cxx
+18
-0
No files found.
idl/source/objects/types.cxx
Dosyayı görüntüle @
04a32c98
...
...
@@ -1844,6 +1844,22 @@ void SvMetaTypeEnum::Save( SvPersistStream & rStm )
if
(
nMask
&
0x02
)
write_lenPrefixed_uInt8s_FromOString
<
sal_uInt16
>
(
rStm
,
aPrefix
);
}
namespace
{
rtl
::
OString
getCommonSubPrefix
(
const
rtl
::
OString
&
rA
,
const
rtl
::
OString
&
rB
)
{
sal_Int32
nMax
=
std
::
min
(
rA
.
getLength
(),
rB
.
getLength
());
sal_Int32
nI
=
0
;
while
(
nI
<
nMax
)
{
if
(
rA
[
nI
]
!=
rB
[
nI
])
break
;
++
nI
;
}
return
rA
.
copy
(
0
,
nI
);
}
}
void
SvMetaTypeEnum
::
ReadContextSvIdl
(
SvIdlDataBase
&
rBase
,
SvTokenStream
&
rInStm
)
{
...
...
@@ -1858,9 +1874,11 @@ void SvMetaTypeEnum::ReadContextSvIdl( SvIdlDataBase & rBase,
aPrefix
=
aEnumVal
->
GetName
().
getString
();
else
{
rtl
::
OString
sCommonPrefix
=
getCommonSubPrefix
(
aPrefix
,
aEnumVal
->
GetName
().
getString
());
sal_uInt16
nPos
=
ByteString
(
aPrefix
).
Match
(
aEnumVal
->
GetName
().
getString
()
);
if
(
nPos
!=
aPrefix
.
getLength
()
&&
nPos
!=
STRING_MATCH
)
aPrefix
=
aPrefix
.
copy
(
0
,
nPos
);
assert
(
sCommonPrefix
==
aPrefix
);
}
aEnumValueList
.
Append
(
aEnumVal
);
}
...
...
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