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
c55a5b24
Kaydet (Commit)
c55a5b24
authored
Kas 14, 2014
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
We don't need 2 variants of this method. One is enough.
Change-Id: I001c388669737e9cf1d92f1fbb1e64fb9f4b05c3
üst
2030b9ac
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
100 deletions
+1
-100
grouparealistener.hxx
sc/inc/grouparealistener.hxx
+0
-10
grouparealistener.cxx
sc/source/core/tool/grouparealistener.cxx
+1
-90
No files found.
sc/inc/grouparealistener.hxx
Dosyayı görüntüle @
c55a5b24
...
...
@@ -38,16 +38,6 @@ public:
virtual
void
Notify
(
const
SfxHint
&
rHint
)
SAL_OVERRIDE
;
/**
* Given the position of a changed cell, collect all formula cells that
* need to be notified of the change.
*
* @param rPos position of changed cell.
* @param rCells all formula cells that need to be notified are put into
* this container.
*/
void
collectFormulaCells
(
const
ScAddress
&
rPos
,
std
::
vector
<
ScFormulaCell
*>&
rCells
)
const
;
/**
* Given the row span of changed cells within a single column, collect all
* formula cells that need to be notified of the change.
...
...
sc/source/core/tool/grouparealistener.cxx
Dosyayı görüntüle @
c55a5b24
...
...
@@ -125,95 +125,6 @@ void FormulaGroupAreaListener::notifyBulkChange( const BulkDataHint& rHint )
std
::
for_each
(
aCells
.
begin
(),
aCells
.
end
(),
Notifier
(
aHint
));
}
void
FormulaGroupAreaListener
::
collectFormulaCells
(
const
ScAddress
&
rPos
,
std
::
vector
<
ScFormulaCell
*>&
rCells
)
const
{
if
(
rPos
.
Tab
()
<
maRange
.
aStart
.
Tab
()
||
maRange
.
aEnd
.
Tab
()
<
rPos
.
Tab
())
// Wrong sheet.
return
;
if
(
rPos
.
Col
()
<
maRange
.
aStart
.
Col
()
||
maRange
.
aEnd
.
Col
()
<
rPos
.
Col
())
// Outside the column range.
return
;
ScFormulaCell
**
pp
=
mppTopCell
;
ScFormulaCell
**
ppEnd
=
pp
+
mnGroupLen
;
if
(
mbStartFixed
)
{
if
(
mbEndFixed
)
{
// Both top and bottom row positions are absolute. Use the original range as-is.
SCROW
nRow1
=
maRange
.
aStart
.
Row
();
SCROW
nRow2
=
maRange
.
aEnd
.
Row
();
if
(
rPos
.
Row
()
<
nRow1
||
nRow2
<
rPos
.
Row
())
return
;
for
(;
pp
!=
ppEnd
;
++
pp
)
rCells
.
push_back
(
*
pp
);
}
else
{
// Only the end row is relative.
SCROW
nRow1
=
maRange
.
aStart
.
Row
();
SCROW
nRow2
=
maRange
.
aEnd
.
Row
();
SCROW
nMaxRow
=
nRow2
+
mnGroupLen
-
1
;
if
(
rPos
.
Row
()
<
nRow1
||
nMaxRow
<
rPos
.
Row
())
return
;
if
(
nRow2
<
rPos
.
Row
())
{
// Skip ahead to the first hit.
SCROW
nSkip
=
rPos
.
Row
()
-
nRow2
;
pp
+=
nSkip
;
nRow2
+=
nSkip
;
}
// Notify the first hit cell and all subsequent ones.
for
(;
pp
!=
ppEnd
;
++
pp
)
rCells
.
push_back
(
*
pp
);
}
}
else
if
(
mbEndFixed
)
{
// Only the start row is relative.
SCROW
nRow1
=
maRange
.
aStart
.
Row
();
SCROW
nRow2
=
maRange
.
aEnd
.
Row
();
if
(
rPos
.
Row
()
<
nRow1
||
nRow2
<
rPos
.
Row
())
return
;
for
(;
pp
!=
ppEnd
&&
nRow1
<=
nRow2
;
++
pp
,
++
nRow1
)
rCells
.
push_back
(
*
pp
);
}
else
{
// Both top and bottom row positions are relative.
SCROW
nRow1
=
maRange
.
aStart
.
Row
();
SCROW
nRow2
=
maRange
.
aEnd
.
Row
();
SCROW
nMaxRow
=
nRow2
+
mnGroupLen
-
1
;
if
(
nMaxRow
<
rPos
.
Row
())
return
;
if
(
nRow2
<
rPos
.
Row
())
{
// Skip ahead.
SCROW
nSkip
=
rPos
.
Row
()
-
nRow2
;
pp
+=
nSkip
;
nRow1
+=
nSkip
;
nRow2
+=
nSkip
;
}
for
(;
pp
!=
ppEnd
;
++
pp
,
++
nRow1
,
++
nRow2
)
{
if
(
rPos
.
Row
()
<
nRow1
||
nRow2
<
rPos
.
Row
())
// Changed cell is outside the range.
continue
;
rCells
.
push_back
(
*
pp
);
}
}
}
void
FormulaGroupAreaListener
::
collectFormulaCells
(
SCTAB
nTab
,
SCCOL
nCol
,
SCROW
nRow1
,
SCROW
nRow2
,
std
::
vector
<
ScFormulaCell
*>&
rCells
)
const
{
...
...
@@ -312,7 +223,7 @@ void FormulaGroupAreaListener::notifyCellChange( const SfxHint& rHint, const ScA
{
// Determine which formula cells within the group need to be notified of this change.
std
::
vector
<
ScFormulaCell
*>
aCells
;
collectFormulaCells
(
rPos
,
aCells
);
collectFormulaCells
(
rPos
.
Tab
(),
rPos
.
Col
(),
rPos
.
Row
(),
rPos
.
Row
()
,
aCells
);
std
::
for_each
(
aCells
.
begin
(),
aCells
.
end
(),
Notifier
(
rHint
));
}
...
...
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