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
4bcdaabe
Kaydet (Commit)
4bcdaabe
authored
Eki 09, 2013
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
CID#736516 memleaks on early exit
Change-Id: I125735e593b26894d3abe34e662ffaf8d585fe6b
üst
fd4d263d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
12 deletions
+11
-12
doctxm.cxx
sw/source/core/doc/doctxm.cxx
+11
-12
No files found.
sw/source/core/doc/doctxm.cxx
Dosyayı görüntüle @
4bcdaabe
...
...
@@ -1978,7 +1978,7 @@ void SwTOXBaseSection::_UpdatePageNum( SwTxtNode* pNd,
const
SwTOXInternational
&
rIntl
)
{
// collect starts end ends of main entry character style
std
::
vector
<
sal_uInt16
>*
pCharStyleIdx
=
pMainEntryNums
?
new
std
::
vector
<
sal_uInt16
>
:
0
;
boost
::
scoped_ptr
<
std
::
vector
<
sal_uInt16
>
>
xCharStyleIdx
(
pMainEntryNums
?
new
std
::
vector
<
sal_uInt16
>
:
0
)
;
OUString
sSrchStr
=
OUStringBuffer
().
append
(
cNumRepl
).
append
(
sPageDeli
).
append
(
cNumRepl
).
makeStringAndClear
();
...
...
@@ -1999,10 +1999,10 @@ void SwTOXBaseSection::_UpdatePageNum( SwTxtNode* pNd,
nCount
=
0
;
String
aNumStr
(
SvxNumberType
(
rDescs
[
0
]
->
GetNumType
()
).
GetNumStr
(
nBeg
)
);
if
(
p
CharStyleIdx
&&
lcl_HasMainEntry
(
pMainEntryNums
,
nBeg
))
if
(
x
CharStyleIdx
&&
lcl_HasMainEntry
(
pMainEntryNums
,
nBeg
))
{
sal_uInt16
nTemp
=
0
;
p
CharStyleIdx
->
push_back
(
nTemp
);
x
CharStyleIdx
->
push_back
(
nTemp
);
}
// Delete place holder
...
...
@@ -2061,9 +2061,9 @@ void SwTOXBaseSection::_UpdatePageNum( SwTxtNode* pNd,
nBeg
=
rNums
[
i
];
aNumStr
.
AppendAscii
(
sPageDeli
);
//the change of the character style must apply after sPageDeli is appended
if
(
p
CharStyleIdx
&&
bMainEntryChanges
)
if
(
x
CharStyleIdx
&&
bMainEntryChanges
)
{
p
CharStyleIdx
->
push_back
(
aNumStr
.
Len
());
x
CharStyleIdx
->
push_back
(
aNumStr
.
Len
());
}
aNumStr
+=
aType
.
GetNumStr
(
nBeg
);
nCount
=
0
;
...
...
@@ -2107,11 +2107,11 @@ void SwTOXBaseSection::_UpdatePageNum( SwTxtNode* pNd,
}
// The main entries should get their character style
if
(
pCharStyleIdx
&&
!
p
CharStyleIdx
->
empty
()
&&
!
GetMainEntryCharStyle
().
isEmpty
())
if
(
xCharStyleIdx
&&
!
x
CharStyleIdx
->
empty
()
&&
!
GetMainEntryCharStyle
().
isEmpty
())
{
// eventually the last index must me appended
if
(
p
CharStyleIdx
->
size
()
&
0x01
)
p
CharStyleIdx
->
push_back
(
aNumStr
.
Len
());
if
(
x
CharStyleIdx
->
size
()
&
0x01
)
x
CharStyleIdx
->
push_back
(
aNumStr
.
Len
());
// search by name
SwDoc
*
pDoc
=
pNd
->
GetDoc
();
...
...
@@ -2127,15 +2127,14 @@ void SwTOXBaseSection::_UpdatePageNum( SwTxtNode* pNd,
// find the page numbers in aNumStr and set the character style
xub_StrLen
nOffset
=
pNd
->
GetTxt
().
getLength
()
-
aNumStr
.
Len
();
SwFmtCharFmt
aCharFmt
(
pCharFmt
);
for
(
sal_uInt16
j
=
0
;
j
<
p
CharStyleIdx
->
size
();
j
+=
2
)
for
(
sal_uInt16
j
=
0
;
j
<
x
CharStyleIdx
->
size
();
j
+=
2
)
{
xub_StrLen
nStartIdx
=
(
*
p
CharStyleIdx
)[
j
]
+
nOffset
;
xub_StrLen
nEndIdx
=
(
*
p
CharStyleIdx
)[
j
+
1
]
+
nOffset
;
xub_StrLen
nStartIdx
=
(
*
x
CharStyleIdx
)[
j
]
+
nOffset
;
xub_StrLen
nEndIdx
=
(
*
x
CharStyleIdx
)[
j
+
1
]
+
nOffset
;
pNd
->
InsertItem
(
aCharFmt
,
nStartIdx
,
nEndIdx
,
nsSetAttrMode
::
SETATTR_DONTEXPAND
);
}
}
delete
pCharStyleIdx
;
}
void
SwTOXBaseSection
::
InsertSorted
(
SwTOXSortTabBase
*
pNew
)
...
...
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