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
880f94b8
Kaydet (Commit)
880f94b8
authored
Kas 21, 2014
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Handle group area listeners correctly when deleting cells.
Change-Id: Ic37084ed670f53e0354056f7bef54229971dd7c2
üst
f085b0ab
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
17 deletions
+45
-17
document.hxx
sc/inc/document.hxx
+1
-0
document.cxx
sc/source/core/data/document.cxx
+22
-17
document10.cxx
sc/source/core/data/document10.cxx
+22
-0
No files found.
sc/inc/document.hxx
Dosyayı görüntüle @
880f94b8
...
...
@@ -1915,6 +1915,7 @@ public:
bool
GetHardRecalcState
()
{
return
bHardRecalcState
;
}
void
SetHardRecalcState
(
bool
bVal
)
{
bHardRecalcState
=
bVal
;
}
void
StartAllListeners
();
void
StartNeededListeners
();
const
ScFormulaCell
*
GetFormulaTree
()
const
{
return
pFormulaTree
;
}
bool
HasForcedFormulas
()
const
{
return
bHasForcedFormulas
;
}
void
SetForcedFormulas
(
bool
bVal
)
{
bHasForcedFormulas
=
bVal
;
}
...
...
sc/source/core/data/document.cxx
Dosyayı görüntüle @
880f94b8
...
...
@@ -1154,19 +1154,6 @@ bool ScDocument::CanInsertRow( const ScRange& rRange ) const
namespace
{
class
StartNeededListenersHandler
:
std
::
unary_function
<
ScTable
*
,
void
>
{
boost
::
shared_ptr
<
sc
::
StartListeningContext
>
mpCxt
;
public
:
StartNeededListenersHandler
(
ScDocument
&
rDoc
)
:
mpCxt
(
new
sc
::
StartListeningContext
(
rDoc
))
{}
void
operator
()
(
ScTable
*
p
)
{
if
(
p
)
p
->
StartListeners
(
*
mpCxt
,
false
);
}
};
struct
SetDirtyIfPostponedHandler
:
std
::
unary_function
<
ScTable
*
,
void
>
{
void
operator
()
(
ScTable
*
p
)
...
...
@@ -1276,7 +1263,7 @@ bool ScDocument::InsertRow( SCCOL nStartCol, SCTAB nStartTab,
}
else
{
// Listeners have been removed in UpdateReference
std
::
for_each
(
maTabs
.
begin
(),
maTabs
.
end
(),
StartNeededListenersHandler
(
*
this
)
);
StartNeededListeners
(
);
// At least all cells using range names pointing relative to the
// moved range must be recalculated, and all cells marked postponed
...
...
@@ -1369,7 +1356,7 @@ void ScDocument::DeleteRow( SCCOL nStartCol, SCTAB nStartTab,
if
(
ValidRow
(
nStartRow
+
nSize
)
)
{
// Listeners have been removed in UpdateReference
std
::
for_each
(
maTabs
.
begin
(),
maTabs
.
end
(),
StartNeededListenersHandler
(
*
this
)
);
StartNeededListeners
(
);
// At least all cells using range names pointing relative to the moved
// range must be recalculated, and all cells marked postponed dirty.
...
...
@@ -1475,7 +1462,7 @@ bool ScDocument::InsertCol( SCROW nStartRow, SCTAB nStartTab,
else
{
// Listeners have been removed in UpdateReference
std
::
for_each
(
maTabs
.
begin
(),
maTabs
.
end
(),
StartNeededListenersHandler
(
*
this
)
);
StartNeededListeners
(
);
// At least all cells using range names pointing relative to the
// moved range must be recalculated, and all cells marked postponed
// dirty.
...
...
@@ -1564,7 +1551,7 @@ void ScDocument::DeleteCol(SCROW nStartRow, SCTAB nStartTab, SCROW nEndRow, SCTA
if
(
ValidCol
(
sal
::
static_int_cast
<
SCCOL
>
(
nStartCol
+
nSize
))
)
{
// Listeners have been removed in UpdateReference
std
::
for_each
(
maTabs
.
begin
(),
maTabs
.
end
(),
StartNeededListenersHandler
(
*
this
)
);
StartNeededListeners
(
);
// At least all cells using range names pointing relative to the moved
// range must be recalculated, and all cells marked postponed dirty.
...
...
@@ -1777,11 +1764,29 @@ void ScDocument::DeleteArea(
PutInOrder
(
nCol1
,
nCol2
);
PutInOrder
(
nRow1
,
nRow2
);
// Record the positions of top and/or bottom formula groups that intersect
// the area borders.
std
::
vector
<
ScAddress
>
aGroupPos
;
sc
::
EndListeningContext
aCxt
(
*
this
);
ScRange
aRange
(
nCol1
,
nRow1
,
0
,
nCol2
,
nRow2
,
0
);
for
(
size_t
i
=
0
;
i
<
maTabs
.
size
();
++
i
)
{
aRange
.
aStart
.
SetTab
(
i
);
aRange
.
aEnd
.
SetTab
(
i
);
EndListeningIntersectedGroups
(
aCxt
,
aRange
,
&
aGroupPos
);
}
aCxt
.
purgeEmptyBroadcasters
();
for
(
SCTAB
i
=
0
;
i
<
static_cast
<
SCTAB
>
(
maTabs
.
size
());
i
++
)
if
(
maTabs
[
i
])
if
(
rMark
.
GetTableSelect
(
i
)
||
bIsUndo
)
maTabs
[
i
]
->
DeleteArea
(
nCol1
,
nRow1
,
nCol2
,
nRow2
,
nDelFlag
,
bBroadcast
,
pBroadcastSpans
);
// Re-start listeners on those top bottom groups that have been split.
SetNeedsListeningGroups
(
aGroupPos
);
StartNeededListeners
();
}
void
ScDocument
::
DeleteAreaTab
(
SCCOL
nCol1
,
SCROW
nRow1
,
...
...
sc/source/core/data/document10.cxx
Dosyayı görüntüle @
880f94b8
...
...
@@ -384,4 +384,26 @@ void ScDocument::SetNeedsListeningGroups( const std::vector<ScAddress>& rPosArra
}
}
namespace
{
class
StartNeededListenersHandler
:
std
::
unary_function
<
ScTable
*
,
void
>
{
boost
::
shared_ptr
<
sc
::
StartListeningContext
>
mpCxt
;
public
:
StartNeededListenersHandler
(
ScDocument
&
rDoc
)
:
mpCxt
(
new
sc
::
StartListeningContext
(
rDoc
))
{}
void
operator
()
(
ScTable
*
p
)
{
if
(
p
)
p
->
StartListeners
(
*
mpCxt
,
false
);
}
};
}
void
ScDocument
::
StartNeededListeners
()
{
std
::
for_each
(
maTabs
.
begin
(),
maTabs
.
end
(),
StartNeededListenersHandler
(
*
this
));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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