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
dc35a397
Kaydet (Commit)
dc35a397
authored
Şub 04, 2012
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed incorrect insertion.
üst
42d04ed4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
14 deletions
+16
-14
olinetab.hxx
sc/inc/olinetab.hxx
+1
-1
olinetab.cxx
sc/source/core/data/olinetab.cxx
+15
-13
No files found.
sc/inc/olinetab.hxx
Dosyayı görüntüle @
dc35a397
...
@@ -106,7 +106,7 @@ private:
...
@@ -106,7 +106,7 @@ private:
bool
DecDepth
();
bool
DecDepth
();
void
FindEntry
(
void
FindEntry
(
SCCOLROW
nSearchPos
,
size_t
&
rFindLevel
,
ScOutlineCollection
::
iterator
&
rFindPos
,
SCCOLROW
nSearchPos
,
size_t
&
rFindLevel
,
size_t
&
rFindIndex
,
size_t
nMaxLevel
=
SC_OL_MAXDEPTH
);
size_t
nMaxLevel
=
SC_OL_MAXDEPTH
);
void
RemoveSub
(
SCCOLROW
nStartPos
,
SCCOLROW
nEndPos
,
size_t
nLevel
);
void
RemoveSub
(
SCCOLROW
nStartPos
,
SCCOLROW
nEndPos
,
size_t
nLevel
);
...
...
sc/source/core/data/olinetab.cxx
Dosyayı görüntüle @
dc35a397
...
@@ -203,10 +203,10 @@ ScOutlineArray::ScOutlineArray( const ScOutlineArray& rArray ) :
...
@@ -203,10 +203,10 @@ ScOutlineArray::ScOutlineArray( const ScOutlineArray& rArray ) :
}
}
void
ScOutlineArray
::
FindEntry
(
void
ScOutlineArray
::
FindEntry
(
SCCOLROW
nSearchPos
,
size_t
&
rFindLevel
,
ScOutlineCollection
::
iterator
&
rFindPos
,
SCCOLROW
nSearchPos
,
size_t
&
rFindLevel
,
size_t
&
rFindIndex
,
size_t
nMaxLevel
)
size_t
nMaxLevel
)
{
{
rFindLevel
=
0
;
rFindLevel
=
rFindIndex
=
0
;
if
(
nMaxLevel
>
nDepth
)
if
(
nMaxLevel
>
nDepth
)
nMaxLevel
=
nDepth
;
nMaxLevel
=
nDepth
;
...
@@ -215,14 +215,13 @@ void ScOutlineArray::FindEntry(
...
@@ -215,14 +215,13 @@ void ScOutlineArray::FindEntry(
{
{
ScOutlineCollection
*
pCollect
=
&
aCollections
[
nLevel
];
ScOutlineCollection
*
pCollect
=
&
aCollections
[
nLevel
];
ScOutlineCollection
::
iterator
it
=
pCollect
->
begin
(),
itEnd
=
pCollect
->
end
();
ScOutlineCollection
::
iterator
it
=
pCollect
->
begin
(),
itEnd
=
pCollect
->
end
();
rFindPos
=
itEnd
;
for
(;
it
!=
itEnd
;
++
it
)
for
(;
it
!=
itEnd
;
++
it
)
{
{
ScOutlineEntry
*
pEntry
=
it
->
second
;
ScOutlineEntry
*
pEntry
=
it
->
second
;
if
(
pEntry
->
GetStart
()
<=
nSearchPos
&&
pEntry
->
GetEnd
()
>=
nSearchPos
)
if
(
pEntry
->
GetStart
()
<=
nSearchPos
&&
pEntry
->
GetEnd
()
>=
nSearchPos
)
{
{
rFindLevel
=
nLevel
+
1
;
// naechster Level (zum Einfuegen)
rFindLevel
=
nLevel
+
1
;
// naechster Level (zum Einfuegen)
rFind
Pos
=
it
;
rFind
Index
=
std
::
distance
(
pCollect
->
begin
(),
it
)
;
}
}
}
}
}
}
...
@@ -233,20 +232,19 @@ bool ScOutlineArray::Insert(
...
@@ -233,20 +232,19 @@ bool ScOutlineArray::Insert(
{
{
rSizeChanged
=
false
;
rSizeChanged
=
false
;
size_t
nStartLevel
,
nEndLevel
;
size_t
nStartLevel
,
nEndLevel
,
nStartIndex
,
nEndIndex
;
ScOutlineCollection
::
iterator
itStartPos
,
itEndPos
;
bool
bFound
=
false
;
bool
bFound
=
false
;
bool
bCont
;
bool
bCont
;
sal_uInt16
nFindMax
;
sal_uInt16
nFindMax
;
FindEntry
(
nStartCol
,
nStartLevel
,
itStartPos
);
// nLevel = neuer Level (alter+1) !!!
FindEntry
(
nStartCol
,
nStartLevel
,
nStartIndex
);
// nLevel = neuer Level (alter+1) !!!
FindEntry
(
nEndCol
,
nEndLevel
,
itEndPos
);
FindEntry
(
nEndCol
,
nEndLevel
,
nEndIndex
);
nFindMax
=
Max
(
nStartLevel
,
nEndLevel
);
nFindMax
=
Max
(
nStartLevel
,
nEndLevel
);
do
do
{
{
bCont
=
false
;
bCont
=
false
;
if
(
nStartLevel
==
nEndLevel
&&
itStartPos
==
itEndPos
&&
nStartLevel
<
SC_OL_MAXDEPTH
)
if
(
nStartLevel
==
nEndLevel
&&
nStartIndex
==
nEndIndex
&&
nStartLevel
<
SC_OL_MAXDEPTH
)
bFound
=
true
;
bFound
=
true
;
if
(
!
bFound
)
if
(
!
bFound
)
...
@@ -256,14 +254,18 @@ bool ScOutlineArray::Insert(
...
@@ -256,14 +254,18 @@ bool ScOutlineArray::Insert(
--
nFindMax
;
--
nFindMax
;
if
(
nStartLevel
)
if
(
nStartLevel
)
{
{
if
(
itStartPos
->
second
->
GetStart
()
==
nStartCol
)
ScOutlineCollection
::
const_iterator
it
=
aCollections
[
nStartLevel
-
1
].
begin
();
FindEntry
(
nStartCol
,
nStartLevel
,
itStartPos
,
nFindMax
);
std
::
advance
(
it
,
nStartIndex
);
if
(
it
->
second
->
GetStart
()
==
nStartCol
)
FindEntry
(
nStartCol
,
nStartLevel
,
nStartIndex
,
nFindMax
);
}
}
if
(
nEndLevel
)
if
(
nEndLevel
)
{
{
if
(
itEndPos
->
second
->
GetEnd
()
==
nEndCol
)
ScOutlineCollection
::
const_iterator
it
=
aCollections
[
nEndLevel
-
1
].
begin
();
FindEntry
(
nEndCol
,
nEndLevel
,
itEndPos
,
nFindMax
);
std
::
advance
(
it
,
nEndIndex
);
if
(
it
->
second
->
GetEnd
()
==
nEndCol
)
FindEntry
(
nEndCol
,
nEndLevel
,
nEndIndex
,
nFindMax
);
}
}
bCont
=
true
;
bCont
=
true
;
}
}
...
...
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