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
cd470c64
Kaydet (Commit)
cd470c64
authored
Eki 26, 2013
tarafından
Matteo Casalin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
xub_StrLen to sal_Int32 and minor optimizations
Change-Id: Ie8703ee0ff6c428ed00ffb88749540588e608b43
üst
22db67c9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
textconv.cxx
editeng/source/editeng/textconv.cxx
+8
-10
No files found.
editeng/source/editeng/textconv.cxx
Dosyayı görüntüle @
cd470c64
...
...
@@ -455,17 +455,15 @@ void TextConvWrapper::ChangeText( const OUString &rNewText,
const
sal_Int32
nIndices
=
pOffsets
->
getLength
();
const
sal_Int32
*
pIndices
=
pOffsets
->
getConstArray
();
sal_Int32
nConvTextLen
=
rNewText
.
getLength
();
const
sal_Int32
nConvTextLen
=
rNewText
.
getLength
();
sal_Int32
nPos
=
0
;
sal_Int32
nChgPos
=
-
1
;
sal_Int32
nChgLen
=
0
;
sal_Int32
nConvChgPos
=
-
1
;
sal_Int32
nConvChgLen
=
0
;
// offset to calculate the position in the text taking into
// account that text may have been replaced with new text of
// different length. Negative values allowed!
long
nCorrectionOffset
=
0
;
sal_Int32
nCorrectionOffset
=
0
;
DBG_ASSERT
(
nIndices
==
0
||
nIndices
==
nConvTextLen
,
"mismatch between string length and sequence length!"
);
...
...
@@ -483,14 +481,14 @@ void TextConvWrapper::ChangeText( const OUString &rNewText,
nIndex
=
rOrigText
.
getLength
();
}
if
(
rOrigText
[
nIndex
]
==
rNewText
[
nPos
]
||
nPos
==
nConvTextLen
/* end of string also terminates non-matching char sequence */
)
// end of string also terminates non-matching char sequence
if
(
rOrigText
[
nIndex
]
==
rNewText
[
nPos
]
||
nPos
==
nConvTextLen
)
{
// substring that needs to be replaced found?
if
(
nChgPos
!=
-
1
&&
nConvChgPos
!=
-
1
)
if
(
nChgPos
>=
0
&&
nConvChgPos
>=
0
)
{
nChgLen
=
nIndex
-
nChgPos
;
nConvChgLen
=
nPos
-
nConvChgPos
;
const
sal_Int32
nChgLen
=
nIndex
-
nChgPos
;
const
sal_Int32
nConvChgLen
=
nPos
-
nConvChgPos
;
#ifdef DEBUG
OUString
aInOrig
(
rOrigText
.
copy
(
nChgPos
,
nChgLen
)
);
#endif
...
...
@@ -520,7 +518,7 @@ void TextConvWrapper::ChangeText( const OUString &rNewText,
else
{
// begin of non-matching char sequence found ?
if
(
nChgPos
==
-
1
&&
nConvChgPos
==
-
1
)
if
(
nChgPos
<
0
&&
nConvChgPos
<
0
)
{
nChgPos
=
nIndex
;
nConvChgPos
=
nPos
;
...
...
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