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
c4a8c348
Kaydet (Commit)
c4a8c348
authored
May 03, 2015
tarafından
Matteo Casalin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Use range-based for loops, better integer types and avoid some casts
Change-Id: Ife8bb0bb1d20655c0526aad1d4921713c961eb7a
üst
0f88c2a7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
20 deletions
+21
-20
tblsel.cxx
sw/source/core/frmedt/tblsel.cxx
+21
-20
No files found.
sw/source/core/frmedt/tblsel.cxx
Dosyayı görüntüle @
c4a8c348
...
@@ -86,6 +86,7 @@ struct _CmpLPt
...
@@ -86,6 +86,7 @@ struct _CmpLPt
typedef
o3tl
::
sorted_vector
<
_CmpLPt
>
_MergePos
;
typedef
o3tl
::
sorted_vector
<
_CmpLPt
>
_MergePos
;
struct
_Sort_CellFrm
struct
_Sort_CellFrm
{
{
const
SwCellFrm
*
pFrm
;
const
SwCellFrm
*
pFrm
;
...
@@ -206,7 +207,7 @@ void GetTblSel( const SwCursor& rCrsr, SwSelBoxes& rBoxes,
...
@@ -206,7 +207,7 @@ void GetTblSel( const SwCursor& rCrsr, SwSelBoxes& rBoxes,
for
(
;
nSttPos
<=
nEndPos
;
++
nSttPos
)
for
(
;
nSttPos
<=
nEndPos
;
++
nSttPos
)
{
{
pLine
=
rLines
[
nSttPos
];
pLine
=
rLines
[
nSttPos
];
for
(
sal_uInt16
n
=
pLine
->
GetTabBoxes
().
size
();
n
;
)
for
(
auto
n
=
pLine
->
GetTabBoxes
().
size
();
n
;
)
{
{
SwTableBox
*
pBox
=
pLine
->
GetTabBoxes
()[
--
n
];
SwTableBox
*
pBox
=
pLine
->
GetTabBoxes
()[
--
n
];
// check for cell protection??
// check for cell protection??
...
@@ -466,10 +467,12 @@ bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd )
...
@@ -466,10 +467,12 @@ bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd )
::
MakeSelUnions
(
aUnions
,
pStart
,
pEnd
,
nsSwTblSearchType
::
TBLSEARCH_NO_UNION_CORRECT
);
::
MakeSelUnions
(
aUnions
,
pStart
,
pEnd
,
nsSwTblSearchType
::
TBLSEARCH_NO_UNION_CORRECT
);
// find boxes for each entry and emit
// find boxes for each entry and emit
for
(
i
=
0
;
i
<
aUnions
.
size
()
&&
bTblIsValid
&&
for
(
auto
&
rSelUnion
:
aUnions
)
bValidChartSel
;
++
i
)
{
{
SwSelUnion
*
pUnion
=
&
aUnions
[
i
];
if
(
!
bTblIsValid
||
!
bValidChartSel
)
break
;
SwSelUnion
*
pUnion
=
&
rSelUnion
;
const
SwTabFrm
*
pTable
=
pUnion
->
GetTable
();
const
SwTabFrm
*
pTable
=
pUnion
->
GetTable
();
SWRECTFN
(
pTable
)
SWRECTFN
(
pTable
)
...
@@ -879,9 +882,9 @@ bool IsEmptyBox( const SwTableBox& rBox, SwPaM& rPam )
...
@@ -879,9 +882,9 @@ bool IsEmptyBox( const SwTableBox& rBox, SwPaM& rPam )
nEndIdx
=
rBox
.
GetSttNd
()
->
EndOfSectionIndex
(),
nEndIdx
=
rBox
.
GetSttNd
()
->
EndOfSectionIndex
(),
nIdx
;
nIdx
;
for
(
sal_uInt16
n
=
0
;
n
<
rFmts
.
size
();
++
n
)
for
(
auto
pFmt
:
rFmts
)
{
{
const
SwFmtAnchor
&
rAnchor
=
rFmts
[
n
]
->
GetAnchor
();
const
SwFmtAnchor
&
rAnchor
=
pFmt
->
GetAnchor
();
const
SwPosition
*
pAPos
=
rAnchor
.
GetCntntAnchor
();
const
SwPosition
*
pAPos
=
rAnchor
.
GetCntntAnchor
();
if
(
pAPos
&&
if
(
pAPos
&&
((
FLY_AT_PARA
==
rAnchor
.
GetAnchorId
())
||
((
FLY_AT_PARA
==
rAnchor
.
GetAnchorId
())
||
...
@@ -934,11 +937,11 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
...
@@ -934,11 +937,11 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
SWRECTFN
(
pStart
->
GetUpper
()
)
SWRECTFN
(
pStart
->
GetUpper
()
)
for
(
sal_uInt16
i
=
0
;
i
<
aUnions
.
size
();
++
i
)
for
(
auto
&
rSelUnion
:
aUnions
)
{
{
const
SwTabFrm
*
pTabFrm
=
aUnions
[
i
]
.
GetTable
();
const
SwTabFrm
*
pTabFrm
=
rSelUnion
.
GetTable
();
SwRect
&
rUnion
=
aUnions
[
i
]
.
GetUnion
();
SwRect
&
rUnion
=
rSelUnion
.
GetUnion
();
// Skip any repeated headlines in the follow:
// Skip any repeated headlines in the follow:
const
SwLayoutFrm
*
pRow
=
pTabFrm
->
IsFollow
()
?
const
SwLayoutFrm
*
pRow
=
pTabFrm
->
IsFollow
()
?
...
@@ -1272,7 +1275,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
...
@@ -1272,7 +1275,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
aPosArr
[
0
].
Y
()
)
:
aPosArr
[
0
].
Y
()
)
:
0
;
0
;
for
(
sal_uInt16
n
=
0
;
n
<
aPosArr
.
size
();
++
n
)
for
(
_MergePos
::
size_type
n
=
0
;
n
<
aPosArr
.
size
();
++
n
)
{
{
const
_CmpLPt
&
rPt
=
aPosArr
[
n
];
const
_CmpLPt
&
rPt
=
aPosArr
[
n
];
if
(
bCalcWidth
)
if
(
bCalcWidth
)
...
@@ -1329,9 +1332,8 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
...
@@ -1329,9 +1332,8 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
SwPaM
aPam
(
aInsPos
);
SwPaM
aPam
(
aInsPos
);
for
(
sal_uInt16
n
=
0
;
n
<
aPosArr
.
size
();
++
n
)
for
(
const
auto
&
rPt
:
aPosArr
)
{
{
const
_CmpLPt
&
rPt
=
aPosArr
[
n
];
aPam
.
GetPoint
()
->
nNode
.
Assign
(
*
rPt
.
pSelBox
->
GetSttNd
()
->
aPam
.
GetPoint
()
->
nNode
.
Assign
(
*
rPt
.
pSelBox
->
GetSttNd
()
->
EndOfSectionNode
(),
-
1
);
EndOfSectionNode
(),
-
1
);
SwCntntNode
*
pCNd
=
aPam
.
GetCntntNode
();
SwCntntNode
*
pCNd
=
aPam
.
GetCntntNode
();
...
@@ -1537,7 +1539,7 @@ static void lcl_FindStartEndRow( const SwLayoutFrm *&rpStart,
...
@@ -1537,7 +1539,7 @@ static void lcl_FindStartEndRow( const SwLayoutFrm *&rpStart,
aEndArr
.
push_front
(
pTmp
);
aEndArr
.
push_front
(
pTmp
);
}
}
for
(
s
al_uInt16
n
=
0
;
n
<
aEndArr
.
size
()
&&
n
<
aSttArr
.
size
();
++
n
)
for
(
s
td
::
deque
<
const
SwLayoutFrm
*>::
size_type
n
=
0
;
n
<
aEndArr
.
size
()
&&
n
<
aSttArr
.
size
();
++
n
)
if
(
aSttArr
[
n
]
!=
aEndArr
[
n
]
)
if
(
aSttArr
[
n
]
!=
aEndArr
[
n
]
)
{
{
// first unequal line or box - all odds are
// first unequal line or box - all odds are
...
@@ -1973,10 +1975,9 @@ bool CheckSplitCells( const SwCursor& rCrsr, sal_uInt16 nDiv,
...
@@ -1973,10 +1975,9 @@ bool CheckSplitCells( const SwCursor& rCrsr, sal_uInt16 nDiv,
::
MakeSelUnions
(
aUnions
,
pStart
,
pEnd
,
eSearchType
);
::
MakeSelUnions
(
aUnions
,
pStart
,
pEnd
,
eSearchType
);
// now search boxes for each entry and emit
// now search boxes for each entry and emit
for
(
sal_uInt16
i
=
0
;
i
<
aUnions
.
size
();
++
i
)
for
(
auto
rSelUnion
:
aUnions
)
{
{
SwSelUnion
*
pUnion
=
&
aUnions
[
i
];
const
SwTabFrm
*
pTable
=
rSelUnion
.
GetTable
();
const
SwTabFrm
*
pTable
=
pUnion
->
GetTable
();
// Skip any repeated headlines in the follow:
// Skip any repeated headlines in the follow:
const
SwLayoutFrm
*
pRow
=
pTable
->
IsFollow
()
?
const
SwLayoutFrm
*
pRow
=
pTable
->
IsFollow
()
?
...
@@ -1985,14 +1986,14 @@ bool CheckSplitCells( const SwCursor& rCrsr, sal_uInt16 nDiv,
...
@@ -1985,14 +1986,14 @@ bool CheckSplitCells( const SwCursor& rCrsr, sal_uInt16 nDiv,
while
(
pRow
)
while
(
pRow
)
{
{
if
(
pRow
->
Frm
().
IsOver
(
pUnion
->
GetUnion
()
)
)
if
(
pRow
->
Frm
().
IsOver
(
rSelUnion
.
GetUnion
()
)
)
{
{
const
SwLayoutFrm
*
pCell
=
pRow
->
FirstCell
();
const
SwLayoutFrm
*
pCell
=
pRow
->
FirstCell
();
while
(
pCell
&&
pRow
->
IsAnLower
(
pCell
)
)
while
(
pCell
&&
pRow
->
IsAnLower
(
pCell
)
)
{
{
OSL_ENSURE
(
pCell
->
IsCellFrm
(),
"Frame without cell"
);
OSL_ENSURE
(
pCell
->
IsCellFrm
(),
"Frame without cell"
);
if
(
::
IsFrmInTblSel
(
pUnion
->
GetUnion
(),
pCell
)
)
if
(
::
IsFrmInTblSel
(
rSelUnion
.
GetUnion
(),
pCell
)
)
{
{
if
(
(
pCell
->
Frm
().
*
fnRect
->
fnGetWidth
)()
<
nMinValue
)
if
(
(
pCell
->
Frm
().
*
fnRect
->
fnGetWidth
)()
<
nMinValue
)
return
false
;
return
false
;
...
@@ -2369,8 +2370,8 @@ void _FndBox::MakeFrms( SwTable &rTable )
...
@@ -2369,8 +2370,8 @@ void _FndBox::MakeFrms( SwTable &rTable )
// ???? or is this the last Follow of the table ????
// ???? or is this the last Follow of the table ????
pUpperFrm
=
pTable
;
pUpperFrm
=
pTable
;
for
(
i
=
nStPos
;
(
sal_uInt16
)
i
<=
nEndPos
;
++
i
)
for
(
sal_uInt16
j
=
nStPos
;
j
<=
nEndPos
;
++
j
)
::
lcl_InsertRow
(
*
rTable
.
GetTabLines
()[
static_cast
<
sal_uInt16
>
(
i
)
],
::
lcl_InsertRow
(
*
rTable
.
GetTabLines
()[
j
],
static_cast
<
SwLayoutFrm
*>
(
pUpperFrm
),
pSibling
);
static_cast
<
SwLayoutFrm
*>
(
pUpperFrm
),
pSibling
);
if
(
pUpperFrm
->
IsTabFrm
()
)
if
(
pUpperFrm
->
IsTabFrm
()
)
static_cast
<
SwTabFrm
*>
(
pUpperFrm
)
->
SetCalcLowers
();
static_cast
<
SwTabFrm
*>
(
pUpperFrm
)
->
SetCalcLowers
();
...
...
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