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
4ec9f68f
Kaydet (Commit)
4ec9f68f
authored
Mar 08, 2013
tarafından
Ádám Csaba Király
Kaydeden (comit)
Cédric Bosdonnat
Mar 11, 2013
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#61458, index should be "flat"
Change-Id: I46db120fc5e7d616cd4c9eadee7fc4c502569e86
üst
730df392
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
doctxm.cxx
sw/source/core/doc/doctxm.cxx
+28
-0
No files found.
sw/source/core/doc/doctxm.cxx
Dosyayı görüntüle @
4ec9f68f
...
@@ -1559,6 +1559,32 @@ static String lcl_GetNumString( const SwTOXSortTabBase& rBase, bool bUsePrefix,
...
@@ -1559,6 +1559,32 @@ static String lcl_GetNumString( const SwTOXSortTabBase& rBase, bool bUsePrefix,
return
sRet
;
return
sRet
;
}
}
/*--------------------------------------------------------------------
Description: Generate String with newlines changed to spaces,
consecutive spaces changed to a single space, and trailing space removed.
--------------------------------------------------------------------*/
String
lcl_RemoveLineBreaks
(
String
sRet
)
{
xub_StrLen
nOffset
=
0
;
sRet
.
SearchAndReplaceAll
(
'\n'
,
' '
);
for
(
xub_StrLen
i
=
1
;
i
<
sRet
.
Len
();
i
++
)
{
if
(
sRet
.
GetChar
(
i
-
1
)
==
' '
&&
sRet
.
GetChar
(
i
)
==
' '
)
{
nOffset
+=
1
;
}
else
{
sRet
.
SetChar
(
i
-
nOffset
,
sRet
.
GetChar
(
i
));
}
}
if
(
sRet
.
GetChar
(
sRet
.
Len
()
-
1
)
==
' '
)
{
nOffset
+=
1
;
}
return
sRet
.
Copy
(
0
,
sRet
.
Len
()
-
nOffset
);
}
// Add parameter <_TOXSectNdIdx> and <_pDefaultPageDesc> in order to control,
// Add parameter <_TOXSectNdIdx> and <_pDefaultPageDesc> in order to control,
// which page description is used, no appropriate one is found.
// which page description is used, no appropriate one is found.
void
SwTOXBaseSection
::
GenerateText
(
sal_uInt16
nArrayIdx
,
void
SwTOXBaseSection
::
GenerateText
(
sal_uInt16
nArrayIdx
,
...
@@ -1607,6 +1633,7 @@ void SwTOXBaseSection::GenerateText( sal_uInt16 nArrayIdx,
...
@@ -1607,6 +1633,7 @@ void SwTOXBaseSection::GenerateText( sal_uInt16 nArrayIdx,
{
{
SwIndex
aIdx
(
pTOXNd
,
rTxt
.
Len
()
);
SwIndex
aIdx
(
pTOXNd
,
rTxt
.
Len
()
);
rBase
.
FillText
(
*
pTOXNd
,
aIdx
);
rBase
.
FillText
(
*
pTOXNd
,
aIdx
);
rTxt
=
lcl_RemoveLineBreaks
(
rTxt
);
}
}
break
;
break
;
...
@@ -1617,6 +1644,7 @@ void SwTOXBaseSection::GenerateText( sal_uInt16 nArrayIdx,
...
@@ -1617,6 +1644,7 @@ void SwTOXBaseSection::GenerateText( sal_uInt16 nArrayIdx,
SwIndex
aIdx
(
pTOXNd
,
rTxt
.
Len
()
);
SwIndex
aIdx
(
pTOXNd
,
rTxt
.
Len
()
);
rBase
.
FillText
(
*
pTOXNd
,
aIdx
);
rBase
.
FillText
(
*
pTOXNd
,
aIdx
);
rTxt
=
lcl_RemoveLineBreaks
(
rTxt
);
}
}
break
;
break
;
...
...
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