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
3b992e24
Kaydet (Commit)
3b992e24
authored
May 10, 2012
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
repaint color scale range if min/max changed
Change-Id: Id9a8479d286e50756c41fbd948d738a0c8d8c883
üst
a1b1c1eb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
0 deletions
+54
-0
colorscale.hxx
sc/inc/colorscale.hxx
+5
-0
colorscale.cxx
sc/source/core/data/colorscale.cxx
+37
-0
documen7.cxx
sc/source/core/data/documen7.cxx
+12
-0
No files found.
sc/inc/colorscale.hxx
Dosyayı görüntüle @
3b992e24
...
...
@@ -70,6 +70,7 @@ private:
double
GetMaxValue
()
const
;
void
calcMinMax
(
double
&
nMin
,
double
&
nMax
)
const
;
bool
CheckEntriesForRel
(
const
ScRange
&
rRange
)
const
;
public
:
ScColorScaleFormat
(
ScDocument
*
pDoc
);
...
...
@@ -77,6 +78,8 @@ public:
void
AddEntry
(
ScColorScaleEntry
*
pEntry
);
void
SetRange
(
const
ScRangeList
&
rList
);
void
DataChanged
(
const
ScRange
&
rRange
);
typedef
ColorScaleEntries
::
iterator
iterator
;
typedef
ColorScaleEntries
::
const_iterator
const_iterator
;
iterator
begin
();
...
...
@@ -99,6 +102,8 @@ public:
ScColorScaleFormat
*
GetFormat
(
sal_uInt32
nFormat
);
void
AddFormat
(
ScColorScaleFormat
*
pFormat
);
void
DataChanged
(
const
ScRange
&
rRange
);
iterator
begin
();
const_iterator
begin
()
const
;
iterator
end
();
...
...
sc/source/core/data/colorscale.cxx
Dosyayı görüntüle @
3b992e24
...
...
@@ -311,6 +311,35 @@ Color* ScColorScaleFormat::GetColor( const ScAddress& rAddr ) const
return
new
Color
(
aColor
);
}
bool
ScColorScaleFormat
::
CheckEntriesForRel
(
const
ScRange
&
rRange
)
const
{
bool
bNeedUpdate
=
false
;
for
(
const_iterator
itr
=
begin
();
itr
!=
end
();
++
itr
)
{
if
(
itr
->
GetMin
()
||
itr
->
GetMax
())
bNeedUpdate
=
true
;
}
// TODO: check also if the changed value is the new min/max
// or has been the old min/max value
bNeedUpdate
=
bNeedUpdate
&&
maRanges
.
Intersects
(
rRange
);
return
bNeedUpdate
;
}
void
ScColorScaleFormat
::
DataChanged
(
const
ScRange
&
rRange
)
{
bool
bNeedUpdate
=
CheckEntriesForRel
(
rRange
);
if
(
bNeedUpdate
)
{
size_t
n
=
maRanges
.
size
();
for
(
size_t
i
=
0
;
i
<
n
;
++
i
)
{
ScRange
*
pRange
=
maRanges
[
i
];
mpDoc
->
RepaintRange
(
*
pRange
);
}
}
}
ScColorScaleFormat
::
iterator
ScColorScaleFormat
::
begin
()
{
return
maColorScales
.
begin
();
...
...
@@ -370,4 +399,12 @@ size_t ScColorScaleFormatList::size() const
return
maColorScaleFormats
.
size
();
}
void
ScColorScaleFormatList
::
DataChanged
(
const
ScRange
&
rRange
)
{
for
(
iterator
itr
=
begin
();
itr
!=
end
();
++
itr
)
{
itr
->
DataChanged
(
rRange
);
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sc/source/core/data/documen7.cxx
Dosyayı görüntüle @
3b992e24
...
...
@@ -44,6 +44,7 @@
#include "scmod.hxx" // SC_MOD
#include "inputopt.hxx" // GetExpandRefs
#include "conditio.hxx"
#include "colorscale.hxx"
#include "sheetevents.hxx"
#include <tools/shl.hxx>
...
...
@@ -111,6 +112,9 @@ void ScDocument::Broadcast( const ScHint& rHint )
if
(
pCondFormList
&&
rHint
.
GetAddress
()
!=
BCA_BRDCST_ALWAYS
)
pCondFormList
->
SourceChanged
(
rHint
.
GetAddress
()
);
if
(
mpColorScaleList
&&
rHint
.
GetAddress
()
!=
BCA_BRDCST_ALWAYS
)
mpColorScaleList
->
DataChanged
(
rHint
.
GetAddress
()
);
if
(
rHint
.
GetAddress
()
!=
BCA_BRDCST_ALWAYS
)
{
SCTAB
nTab
=
rHint
.
GetAddress
().
Tab
();
...
...
@@ -134,6 +138,9 @@ void ScDocument::AreaBroadcast( const ScHint& rHint )
// Repaint fuer bedingte Formate mit relativen Referenzen:
if
(
pCondFormList
&&
rHint
.
GetAddress
()
!=
BCA_BRDCST_ALWAYS
)
pCondFormList
->
SourceChanged
(
rHint
.
GetAddress
()
);
if
(
mpColorScaleList
&&
rHint
.
GetAddress
()
!=
BCA_BRDCST_ALWAYS
)
mpColorScaleList
->
DataChanged
(
rHint
.
GetAddress
()
);
}
...
...
@@ -177,6 +184,11 @@ void ScDocument::AreaBroadcastInRange( const ScRange& rRange, const ScHint& rHin
}
}
}
if
(
mpColorScaleList
)
{
mpColorScaleList
->
DataChanged
(
rRange
);
}
}
...
...
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