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
caa7f3f5
Kaydet (Commit)
caa7f3f5
authored
May 11, 2012
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
add formula input to color scales
Change-Id: I I7f0a46cf5aea2eb1aa8bc9415d9761cc197b0c23
üst
d0e4d1f3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
5 deletions
+35
-5
colorscale.hxx
sc/inc/colorscale.hxx
+10
-0
colorscale.cxx
sc/source/core/data/colorscale.cxx
+25
-5
No files found.
sc/inc/colorscale.hxx
Dosyayı görüntüle @
caa7f3f5
...
...
@@ -27,18 +27,22 @@
*/
#include <boost/ptr_container/ptr_vector.hpp>
#include <boost/scoped_ptr.hpp>
#include <formula/grammar.hxx>
#include <tools/color.hxx>
#include <rangelst.hxx>
//TODO: merge this with conditio.hxx
class
ScDocument
;
class
ScFormulaCell
;
class
SC_DLLPUBLIC
ScColorScaleEntry
{
private
:
double
mnVal
;
Color
maColor
;
boost
::
scoped_ptr
<
ScFormulaCell
>
mpCell
;
bool
mbMin
;
bool
mbMax
;
...
...
@@ -46,9 +50,11 @@ private:
public
:
ScColorScaleEntry
(
double
nVal
,
const
Color
&
rCol
);
ScColorScaleEntry
(
const
ScColorScaleEntry
&
rEntry
);
~
ScColorScaleEntry
();
const
Color
&
GetColor
()
const
;
double
GetValue
()
const
;
void
SetFormula
(
const
rtl
::
OUString
&
rFormula
,
ScDocument
*
pDoc
,
const
ScAddress
&
rAddr
,
formula
::
FormulaGrammar
::
Grammar
eGrammar
=
formula
::
FormulaGrammar
::
GRAM_DEFAULT
);
bool
GetMin
()
const
;
bool
GetMax
()
const
;
...
...
@@ -80,6 +86,8 @@ public:
void
DataChanged
(
const
ScRange
&
rRange
);
void
UpdateMoveTab
(
SCTAB
nOldTab
,
SCTAB
nNewTab
);
void
UpdateReference
(
UpdateRefMode
eUpdateRefMode
,
const
ScRange
&
rRange
,
SCsCOL
nDx
,
SCsROW
nDy
,
SCsTAB
nDz
);
typedef
ColorScaleEntries
::
iterator
iterator
;
typedef
ColorScaleEntries
::
const_iterator
const_iterator
;
...
...
@@ -105,6 +113,8 @@ public:
void
DataChanged
(
const
ScRange
&
rRange
);
void
UpdateMoveTab
(
SCTAB
nOldTab
,
SCTAB
nNewTab
);
void
UpdateReference
(
UpdateRefMode
eUpdateRefMode
,
const
ScRange
&
rRange
,
SCsCOL
nDx
,
SCsROW
nDy
,
SCsTAB
nDz
);
iterator
begin
();
const_iterator
begin
()
const
;
...
...
sc/source/core/data/colorscale.cxx
Dosyayı görüntüle @
caa7f3f5
...
...
@@ -33,24 +33,44 @@
ScColorScaleEntry
::
ScColorScaleEntry
(
double
nVal
,
const
Color
&
rCol
)
:
mnVal
(
nVal
),
maColor
(
rCol
),
mpCell
(
NULL
),
mbMin
(
false
),
mbMax
(
false
),
mbPercent
(
false
)
{
mbPercent
(
false
)
{
}
ScColorScaleEntry
::
ScColorScaleEntry
(
const
ScColorScaleEntry
&
rEntry
)
:
mnVal
(
rEntry
.
mnVal
),
maColor
(
rEntry
.
maColor
),
mbMin
(
false
),
mbMax
(
false
),
mbPercent
(
false
)
mpCell
(
NULL
),
mbMin
(
rEntry
.
mbMin
),
mbMax
(
rEntry
.
mbMax
),
mbPercent
(
rEntry
.
mbPercent
)
{
}
ScColorScaleEntry
::~
ScColorScaleEntry
()
{
}
void
ScColorScaleEntry
::
SetFormula
(
const
rtl
::
OUString
&
rFormula
,
ScDocument
*
pDoc
,
const
ScAddress
&
rAddr
,
formula
::
FormulaGrammar
::
Grammar
eGrammar
)
{
mpCell
.
reset
(
new
ScFormulaCell
(
pDoc
,
rAddr
,
rFormula
,
eGrammar
));
mpCell
->
StartListeningTo
(
pDoc
);
}
double
ScColorScaleEntry
::
GetValue
()
const
{
if
(
mpCell
)
{
mpCell
->
Interpret
();
if
(
mpCell
->
IsValue
())
return
mpCell
->
GetValue
();
return
std
::
numeric_limits
<
double
>::
max
();
}
return
mnVal
;
}
...
...
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