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
b56614c6
Kaydet (Commit)
b56614c6
authored
Şub 07, 2015
tarafından
Matteo Casalin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Simplify loops and reduce scope of some variables
Change-Id: I55f0044606a75e79d51dd40976f1492ec797b531
üst
2aab43b2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
18 deletions
+16
-18
docredln.cxx
sw/source/core/doc/docredln.cxx
+16
-18
No files found.
sw/source/core/doc/docredln.cxx
Dosyayı görüntüle @
b56614c6
...
@@ -1286,20 +1286,20 @@ void SwRangeRedline::DelCopyOfSection(size_t nMyPos)
...
@@ -1286,20 +1286,20 @@ void SwRangeRedline::DelCopyOfSection(size_t nMyPos)
const
SwRedlineTbl
&
rTbl
=
pDoc
->
getIDocumentRedlineAccess
().
GetRedlineTbl
();
const
SwRedlineTbl
&
rTbl
=
pDoc
->
getIDocumentRedlineAccess
().
GetRedlineTbl
();
sal_uInt16
n
=
nMyPos
;
sal_uInt16
n
=
nMyPos
;
OSL_ENSURE
(
n
!=
USHRT_MAX
,
"How strange. We don't exist!"
);
OSL_ENSURE
(
n
!=
USHRT_MAX
,
"How strange. We don't exist!"
);
for
(
bool
bBreak
=
false
;
!
bBreak
&&
n
>
0
;
)
while
(
n
>
0
)
{
{
--
n
;
--
n
;
bBreak
=
true
;
if
(
rTbl
[
n
]
->
GetBound
(
true
)
==
*
aPam
.
GetPoint
()
)
if
(
rTbl
[
n
]
->
GetBound
(
true
)
==
*
aPam
.
GetPoint
()
)
{
{
rTbl
[
n
]
->
GetBound
(
true
)
=
*
pEnd
;
rTbl
[
n
]
->
GetBound
(
true
)
=
*
pEnd
;
bBreak
=
fals
e
;
continu
e
;
}
}
if
(
rTbl
[
n
]
->
GetBound
(
false
)
==
*
aPam
.
GetPoint
()
)
if
(
rTbl
[
n
]
->
GetBound
(
false
)
==
*
aPam
.
GetPoint
()
)
{
{
rTbl
[
n
]
->
GetBound
(
false
)
=
*
pEnd
;
rTbl
[
n
]
->
GetBound
(
false
)
=
*
pEnd
;
bBreak
=
fals
e
;
continu
e
;
}
}
break
;
}
}
SwPosition
aEnd
(
*
pEnd
);
SwPosition
aEnd
(
*
pEnd
);
...
@@ -1333,41 +1333,39 @@ void SwRangeRedline::MoveFromSection(size_t nMyPos)
...
@@ -1333,41 +1333,39 @@ void SwRangeRedline::MoveFromSection(size_t nMyPos)
const
SwRedlineTbl
&
rTbl
=
pDoc
->
getIDocumentRedlineAccess
().
GetRedlineTbl
();
const
SwRedlineTbl
&
rTbl
=
pDoc
->
getIDocumentRedlineAccess
().
GetRedlineTbl
();
std
::
vector
<
SwPosition
*>
aBeforeArr
,
aBehindArr
;
std
::
vector
<
SwPosition
*>
aBeforeArr
,
aBehindArr
;
OSL_ENSURE
(
this
,
"this is not in the array?"
);
OSL_ENSURE
(
this
,
"this is not in the array?"
);
bool
bBreak
=
false
;
SwRedlineTbl
::
size_type
n
;
for
(
n
=
nMyPos
+
1
;
!
bBreak
&&
n
<
rTbl
.
size
();
++
n
)
for
(
SwRedlineTbl
::
size_type
n
=
nMyPos
+
1
;
n
<
rTbl
.
size
();
++
n
)
{
{
bBreak
=
true
;
if
(
rTbl
[
n
]
->
GetBound
(
true
)
==
*
GetPoint
()
)
if
(
rTbl
[
n
]
->
GetBound
(
true
)
==
*
GetPoint
()
)
{
{
SwRangeRedline
*
pRedl
=
rTbl
[
n
];
SwRangeRedline
*
pRedl
=
rTbl
[
n
];
aBehindArr
.
push_back
(
&
pRedl
->
GetBound
(
true
));
aBehindArr
.
push_back
(
&
pRedl
->
GetBound
(
true
));
bBreak
=
fals
e
;
continu
e
;
}
}
if
(
rTbl
[
n
]
->
GetBound
(
false
)
==
*
GetPoint
()
)
if
(
rTbl
[
n
]
->
GetBound
(
false
)
==
*
GetPoint
()
)
{
{
SwRangeRedline
*
pRedl
=
rTbl
[
n
];
SwRangeRedline
*
pRedl
=
rTbl
[
n
];
aBehindArr
.
push_back
(
&
pRedl
->
GetBound
(
false
));
aBehindArr
.
push_back
(
&
pRedl
->
GetBound
(
false
));
bBreak
=
fals
e
;
continu
e
;
}
}
break
;
}
}
for
(
bBreak
=
false
,
n
=
nMyPos
;
!
bBreak
&&
n
;
)
for
(
SwRedlineTbl
::
size_type
n
=
nMyPos
;
n
;
)
{
{
--
n
;
--
n
;
bBreak
=
true
;
if
(
rTbl
[
n
]
->
GetBound
(
true
)
==
*
GetPoint
()
)
if
(
rTbl
[
n
]
->
GetBound
(
true
)
==
*
GetPoint
()
)
{
{
SwRangeRedline
*
pRedl
=
rTbl
[
n
];
SwRangeRedline
*
pRedl
=
rTbl
[
n
];
aBeforeArr
.
push_back
(
&
pRedl
->
GetBound
(
true
));
aBeforeArr
.
push_back
(
&
pRedl
->
GetBound
(
true
));
bBreak
=
fals
e
;
continu
e
;
}
}
if
(
rTbl
[
n
]
->
GetBound
(
false
)
==
*
GetPoint
()
)
if
(
rTbl
[
n
]
->
GetBound
(
false
)
==
*
GetPoint
()
)
{
{
SwRangeRedline
*
pRedl
=
rTbl
[
n
];
SwRangeRedline
*
pRedl
=
rTbl
[
n
];
aBeforeArr
.
push_back
(
&
pRedl
->
GetBound
(
false
));
aBeforeArr
.
push_back
(
&
pRedl
->
GetBound
(
false
));
bBreak
=
fals
e
;
continu
e
;
}
}
break
;
}
}
const
SwNode
*
pKeptCntntSectNode
(
&
pCntntSect
->
GetNode
()
);
// #i95711#
const
SwNode
*
pKeptCntntSectNode
(
&
pCntntSect
->
GetNode
()
);
// #i95711#
...
@@ -1436,10 +1434,10 @@ void SwRangeRedline::MoveFromSection(size_t nMyPos)
...
@@ -1436,10 +1434,10 @@ void SwRangeRedline::MoveFromSection(size_t nMyPos)
// adjustment of redline table positions must take start and
// adjustment of redline table positions must take start and
// end into account, not point and mark.
// end into account, not point and mark.
for
(
n
=
0
;
n
<
aBeforeArr
.
size
();
++
n
)
for
(
auto
&
pItem
:
aBeforeArr
)
*
aBeforeArr
[
n
]
=
*
Start
();
*
pItem
=
*
Start
();
for
(
n
=
0
;
n
<
aBehindArr
.
size
();
++
n
)
for
(
auto
&
pItem
:
aBehindArr
)
*
aBehindArr
[
n
]
=
*
End
();
*
pItem
=
*
End
();
}
}
else
else
InvalidateRange
();
InvalidateRange
();
...
...
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