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
2b5aa5cf
Kaydet (Commit)
2b5aa5cf
authored
Haz 22, 2012
tarafından
Noel Grandin
Kaydeden (comit)
Michael Stahl
Haz 25, 2012
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Convert methods in ftnbos.hxx from Svptrarr to std::vector
Change-Id: Ia2424719aa45fecbe0d3642683bbdc581aaf78ee
üst
e0b82caf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
30 deletions
+32
-30
ftnboss.hxx
sw/source/core/inc/ftnboss.hxx
+5
-3
ftnfrm.cxx
sw/source/core/layout/ftnfrm.cxx
+19
-19
layouter.cxx
sw/source/core/layout/layouter.cxx
+8
-8
No files found.
sw/source/core/inc/ftnboss.hxx
Dosyayı görüntüle @
2b5aa5cf
...
...
@@ -53,6 +53,8 @@ public:
#define NA_GROW_ADJUST 2
#define NA_ADJUST_GROW 3
typedef
std
::
vector
<
SwFtnFrm
*>
SwFtnFrms
;
class
SwFtnBossFrm
:
public
SwLayoutFrm
{
// for private footnote operations
...
...
@@ -108,7 +110,7 @@ public:
// <_pRefFtnBossFrm> has to be referenced by an object.
static
void
_CollectFtns
(
const
SwCntntFrm
*
_pRef
,
SwFtnFrm
*
_pFtn
,
S
vPtrarr
&
_rFtnArr
,
S
wFtnFrms
&
_rFtnArr
,
const
sal_Bool
_bCollectOnlyPreviousFtns
=
sal_False
,
const
SwFtnBossFrm
*
_pRefFtnBossFrm
=
NULL
);
// The parameter <_bCollectOnlyPreviousFtns> controls if only footnotes
...
...
@@ -116,9 +118,9 @@ public:
// collected.
void
CollectFtns
(
const
SwCntntFrm
*
_pRef
,
SwFtnBossFrm
*
_pOld
,
S
vPtrarr
&
_rFtnArr
,
S
wFtnFrms
&
_rFtnArr
,
const
sal_Bool
_bCollectOnlyPreviousFtns
=
sal_False
);
void
_MoveFtns
(
S
vPtrarr
&
rFtnArr
,
sal_Bool
bCalc
=
sal_False
);
void
_MoveFtns
(
S
wFtnFrms
&
rFtnArr
,
sal_Bool
bCalc
=
sal_False
);
void
MoveFtns
(
const
SwCntntFrm
*
pSrc
,
SwCntntFrm
*
pDest
,
SwTxtFtn
*
pAttr
);
...
...
sw/source/core/layout/ftnfrm.cxx
Dosyayı görüntüle @
2b5aa5cf
...
...
@@ -1931,7 +1931,7 @@ void SwFtnBossFrm::ChangeFtnRef( const SwCntntFrm *pOld, const SwTxtFtn *pAttr,
/// footnote boss frame <this> have to be collected.
void
SwFtnBossFrm
::
CollectFtns
(
const
SwCntntFrm
*
_pRef
,
SwFtnBossFrm
*
_pOld
,
S
vPtrarr
&
_rFtnArr
,
S
wFtnFrms
&
_rFtnArr
,
const
sal_Bool
_bCollectOnlyPreviousFtns
)
{
SwFtnFrm
*
pFtn
=
_pOld
->
FindFirstFtn
();
...
...
@@ -1989,10 +1989,10 @@ void SwFtnBossFrm::CollectFtns( const SwCntntFrm* _pRef,
|* SwFtnBossFrm::_CollectFtns()
|*
|*************************************************************************/
inline
void
FtnInArr
(
S
vPtrarr
&
rFtnArr
,
SwFtnFrm
*
pFtn
)
inline
void
FtnInArr
(
S
wFtnFrms
&
rFtnArr
,
SwFtnFrm
*
pFtn
)
{
if
(
USHRT_MAX
==
rFtnArr
.
GetPos
(
(
VoidPtr
)
pFtn
)
)
rFtnArr
.
Insert
(
(
VoidPtr
)
pFtn
,
rFtnArr
.
Count
()
);
if
(
rFtnArr
.
end
()
==
std
::
find
(
rFtnArr
.
begin
(),
rFtnArr
.
end
(),
pFtn
)
)
rFtnArr
.
push_back
(
pFtn
);
}
/// OD 03.04.2003 #108446# - add parameters <_bCollectOnlyPreviousFtns> and
...
...
@@ -2003,7 +2003,7 @@ inline void FtnInArr( SvPtrarr& rFtnArr, SwFtnFrm* pFtn )
/// Adjust parameter names.
void
SwFtnBossFrm
::
_CollectFtns
(
const
SwCntntFrm
*
_pRef
,
SwFtnFrm
*
_pFtn
,
S
vPtrarr
&
_rFtnArr
,
S
wFtnFrms
&
_rFtnArr
,
sal_Bool
_bCollectOnlyPreviousFtns
,
const
SwFtnBossFrm
*
_pRefFtnBossFrm
)
{
...
...
@@ -2018,7 +2018,7 @@ void SwFtnBossFrm::_CollectFtns( const SwCntntFrm* _pRef,
//(der Inhalt zu einem Attribut kann ueber mehrere Seiten verteilt sein)
//und ausschneiden.
S
vPtrarr
aNotFtnArr
(
20
);
//Zur Robustheit werden hier die nicht
S
wFtnFrms
aNotFtnArr
;
//Zur Robustheit werden hier die nicht
//dazugehoerigen Fussnoten eingetragen.
//Wenn eine Fussnote zweimal angefasst wird
//ists vorbei! So kommt die Funktion auch
...
...
@@ -2135,8 +2135,8 @@ void SwFtnBossFrm::_CollectFtns( const SwCntntFrm* _pRef,
break
;
}
if
(
pNxtFtn
&&
USHRT_MAX
==
_rFtnArr
.
GetPos
(
(
VoidPtr
)
pNxtFtn
)
&&
USHRT_MAX
==
aNotFtnArr
.
GetPos
(
(
VoidPtr
)
pNxtFtn
)
)
_rFtnArr
.
end
()
==
std
::
find
(
_rFtnArr
.
begin
(),
_rFtnArr
.
end
(),
pNxtFtn
)
&&
aNotFtnArr
.
end
()
==
std
::
find
(
aNotFtnArr
.
begin
(),
aNotFtnArr
.
end
(),
pNxtFtn
)
)
_pFtn
=
pNxtFtn
;
else
break
;
...
...
@@ -2150,7 +2150,7 @@ void SwFtnBossFrm::_CollectFtns( const SwCntntFrm* _pRef,
|*************************************************************************/
void
SwFtnBossFrm
::
_MoveFtns
(
S
vPtrarr
&
rFtnArr
,
sal_Bool
bCalc
)
void
SwFtnBossFrm
::
_MoveFtns
(
S
wFtnFrms
&
rFtnArr
,
sal_Bool
bCalc
)
{
//Alle Fussnoten die von pRef referenziert werden muessen von der
//aktuellen Position, die sich durch die alte Spalte/Seite ergab, auf eine
...
...
@@ -2162,9 +2162,9 @@ void SwFtnBossFrm::_MoveFtns( SvPtrarr &rFtnArr, sal_Bool bCalc )
// #i21478# - keep last inserted footnote in order to
// format the content of the following one.
SwFtnFrm
*
pLastInsertedFtn
=
0L
;
for
(
sal_uInt16
i
=
0
;
i
<
rFtnArr
.
Count
();
++
i
)
for
(
sal_uInt16
i
=
0
;
i
<
rFtnArr
.
size
();
++
i
)
{
SwFtnFrm
*
pFtn
=
(
SwFtnFrm
*
)
rFtnArr
[
i
];
SwFtnFrm
*
pFtn
=
rFtnArr
[
i
];
SwFtnBossFrm
*
pRefBoss
=
pFtn
->
GetRef
()
->
FindFtnBossFrm
(
sal_True
);
if
(
pRefBoss
!=
this
)
...
...
@@ -2377,9 +2377,9 @@ void SwFtnBossFrm::MoveFtns( const SwCntntFrm *pSrc, SwCntntFrm *pDest,
OSL_ENSURE
(
pDestBoss
,
"+SwPageFrm::MoveFtns: no destination boss"
);
if
(
pDestBoss
)
// robust
{
S
vPtrarr
aFtnArr
(
5
)
;
S
wFtnFrms
aFtnArr
;
pDestBoss
->
_CollectFtns
(
pDest
,
pFtn
,
aFtnArr
);
if
(
aFtnArr
.
Count
()
)
if
(
!
aFtnArr
.
empty
()
)
{
pDestBoss
->
_MoveFtns
(
aFtnArr
,
sal_True
);
SwPageFrm
*
pSrcPage
=
FindPageFrm
();
...
...
@@ -2888,7 +2888,7 @@ sal_Bool SwLayoutFrm::MoveLowerFtns( SwCntntFrm *pStart, SwFtnBossFrm *pOldBoss,
if
(
!
pStart
)
pStart
=
ContainsCntnt
();
S
vPtrarr
aFtnArr
(
5
)
;
S
wFtnFrms
aFtnArr
;
while
(
IsAnLower
(
pStart
)
)
{
...
...
@@ -2906,13 +2906,13 @@ sal_Bool SwLayoutFrm::MoveLowerFtns( SwCntntFrm *pStart, SwFtnBossFrm *pOldBoss,
OSL_ENSURE
(
pOldBoss
->
IsInSct
()
==
pNewBoss
->
IsInSct
(),
"MoveLowerFtns: Section confusion"
);
S
vPtrarr
*
pFtnArr
;
S
wFtnFrms
*
pFtnArr
;
SwLayoutFrm
*
pNewChief
=
0
;
SwLayoutFrm
*
pOldChief
=
0
;
if
(
pStart
&&
pOldBoss
->
IsInSct
()
&&
(
pOldChief
=
pOldBoss
->
FindSctFrm
()
)
!=
(
pNewChief
=
pNewBoss
->
FindSctFrm
()
)
)
{
pFtnArr
=
new
S
vPtrarr
(
5
)
;
pFtnArr
=
new
S
wFtnFrms
;
pOldChief
=
pOldBoss
->
FindFtnBossFrm
(
sal_True
);
pNewChief
=
pNewBoss
->
FindFtnBossFrm
(
sal_True
);
while
(
pOldChief
->
IsAnLower
(
pStart
)
)
...
...
@@ -2922,7 +2922,7 @@ sal_Bool SwLayoutFrm::MoveLowerFtns( SwCntntFrm *pStart, SwFtnBossFrm *pOldBoss,
(
SwFtnBossFrm
*
)
pOldBoss
,
*
pFtnArr
);
pStart
=
pStart
->
GetNextCntntFrm
();
}
if
(
!
pFtnArr
->
Count
()
)
if
(
pFtnArr
->
empty
()
)
{
delete
pFtnArr
;
pFtnArr
=
NULL
;
...
...
@@ -2931,9 +2931,9 @@ sal_Bool SwLayoutFrm::MoveLowerFtns( SwCntntFrm *pStart, SwFtnBossFrm *pOldBoss,
else
pFtnArr
=
NULL
;
if
(
aFtnArr
.
Count
()
||
pFtnArr
)
if
(
!
aFtnArr
.
empty
()
||
pFtnArr
)
{
if
(
aFtnArr
.
Count
()
)
if
(
!
aFtnArr
.
empty
()
)
pNewBoss
->
_MoveFtns
(
aFtnArr
,
sal_True
);
if
(
pFtnArr
)
{
...
...
sw/source/core/layout/layouter.cxx
Dosyayı görüntüle @
2b5aa5cf
...
...
@@ -60,7 +60,7 @@ class SwEndnoter
{
SwLayouter
*
pMaster
;
SwSectionFrm
*
pSect
;
S
vPtrarr
*
pEndArr
;
S
wFtnFrms
*
pEndArr
;
public
:
SwEndnoter
(
SwLayouter
*
pLay
)
:
pMaster
(
pLay
),
pSect
(
NULL
),
pEndArr
(
NULL
)
{}
...
...
@@ -69,7 +69,7 @@ public:
void
CollectEndnote
(
SwFtnFrm
*
pFtn
);
const
SwSectionFrm
*
GetSect
()
const
{
return
pSect
;
}
void
InsertEndnotes
();
sal_Bool
HasEndnotes
()
const
{
return
pEndArr
&&
pEndArr
->
Count
();
}
sal_Bool
HasEndnotes
()
const
{
return
pEndArr
&&
!
pEndArr
->
empty
();
}
};
void
SwEndnoter
::
CollectEndnotes
(
SwSectionFrm
*
pSct
)
...
...
@@ -84,7 +84,7 @@ void SwEndnoter::CollectEndnotes( SwSectionFrm* pSct )
void
SwEndnoter
::
CollectEndnote
(
SwFtnFrm
*
pFtn
)
{
if
(
pEndArr
&&
USHRT_MAX
!=
pEndArr
->
GetPos
(
(
VoidPtr
)
pFtn
)
)
if
(
pEndArr
&&
pEndArr
->
end
()
!=
std
::
find
(
pEndArr
->
begin
(),
pEndArr
->
end
(),
pFtn
)
)
return
;
if
(
pFtn
->
GetUpper
()
)
...
...
@@ -117,9 +117,9 @@ void SwEndnoter::CollectEndnote( SwFtnFrm* pFtn )
}
else
if
(
pEndArr
)
{
for
(
sal_uInt16
i
=
0
;
i
<
pEndArr
->
Count
();
++
i
)
for
(
sal_uInt16
i
=
0
;
i
<
pEndArr
->
size
();
++
i
)
{
SwFtnFrm
*
pEndFtn
=
(
SwFtnFrm
*
)((
*
pEndArr
)[
i
])
;
SwFtnFrm
*
pEndFtn
=
(
*
pEndArr
)[
i
]
;
if
(
pEndFtn
->
GetAttr
()
==
pFtn
->
GetAttr
()
)
{
delete
pFtn
;
...
...
@@ -128,15 +128,15 @@ void SwEndnoter::CollectEndnote( SwFtnFrm* pFtn )
}
}
if
(
!
pEndArr
)
pEndArr
=
new
S
vPtrarr
(
5
)
;
// deleted from the SwLayouter
pEndArr
->
Insert
(
(
VoidPtr
)
pFtn
,
pEndArr
->
Count
()
);
pEndArr
=
new
S
wFtnFrms
;
// deleted from the SwLayouter
pEndArr
->
push_back
(
pFtn
);
}
void
SwEndnoter
::
InsertEndnotes
()
{
if
(
!
pSect
)
return
;
if
(
!
pEndArr
||
!
pEndArr
->
Count
()
)
if
(
!
pEndArr
||
pEndArr
->
empty
()
)
{
pSect
=
NULL
;
return
;
...
...
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