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
06aeaad3
Kaydet (Commit)
06aeaad3
authored
Agu 11, 2012
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
implement AutoMin and AutoMax, fdo#50462
Change-Id: I73b2eb069bbb06d9b366b68d0ad85728df4d6a3a
üst
c6a8eb06
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
3 deletions
+30
-3
colorscale.hxx
sc/inc/colorscale.hxx
+3
-1
colorscale.cxx
sc/source/core/data/colorscale.cxx
+15
-2
xmlexprt.cxx
sc/source/filter/xml/xmlexprt.cxx
+4
-0
condformatdlg.cxx
sc/source/ui/condformat/condformatdlg.cxx
+8
-0
No files found.
sc/inc/colorscale.hxx
Dosyayı görüntüle @
06aeaad3
...
@@ -49,7 +49,9 @@ enum ScColorScaleEntryType
...
@@ -49,7 +49,9 @@ enum ScColorScaleEntryType
COLORSCALE_MAX
,
COLORSCALE_MAX
,
COLORSCALE_PERCENT
,
COLORSCALE_PERCENT
,
COLORSCALE_PERCENTILE
,
COLORSCALE_PERCENTILE
,
COLORSCALE_FORMULA
COLORSCALE_FORMULA
,
COLORSCALE_AUTOMIN
,
COLORSCALE_AUTOMAX
};
};
class
SC_DLLPUBLIC
ScColorScaleEntry
class
SC_DLLPUBLIC
ScColorScaleEntry
...
...
sc/source/core/data/colorscale.cxx
Dosyayı görüntüle @
06aeaad3
...
@@ -298,7 +298,7 @@ double ScColorScaleFormat::GetMinValue() const
...
@@ -298,7 +298,7 @@ double ScColorScaleFormat::GetMinValue() const
{
{
const_iterator
itr
=
maColorScales
.
begin
();
const_iterator
itr
=
maColorScales
.
begin
();
if
(
itr
->
GetType
()
!=
COLORSCALE_MIN
)
if
(
itr
->
GetType
()
!=
COLORSCALE_MIN
&&
itr
->
GetType
()
!=
COLORSCALE_AUTOMIN
)
return
itr
->
GetValue
();
return
itr
->
GetValue
();
else
else
{
{
...
@@ -310,7 +310,7 @@ double ScColorScaleFormat::GetMaxValue() const
...
@@ -310,7 +310,7 @@ double ScColorScaleFormat::GetMaxValue() const
{
{
ColorScaleEntries
::
const_reverse_iterator
itr
=
maColorScales
.
rbegin
();
ColorScaleEntries
::
const_reverse_iterator
itr
=
maColorScales
.
rbegin
();
if
(
itr
->
GetType
()
!=
COLORSCALE_MAX
)
if
(
itr
->
GetType
()
!=
COLORSCALE_MAX
&&
itr
->
GetType
()
!=
COLORSCALE_AUTOMAX
)
return
itr
->
GetValue
();
return
itr
->
GetValue
();
else
else
{
{
...
@@ -412,8 +412,12 @@ double ScColorScaleFormat::CalcValue(double nMin, double nMax, ScColorScaleForma
...
@@ -412,8 +412,12 @@ double ScColorScaleFormat::CalcValue(double nMin, double nMax, ScColorScaleForma
return
nMin
+
(
nMax
-
nMin
)
*
(
itr
->
GetValue
()
/
100
);
return
nMin
+
(
nMax
-
nMin
)
*
(
itr
->
GetValue
()
/
100
);
case
COLORSCALE_MIN
:
case
COLORSCALE_MIN
:
return
nMin
;
return
nMin
;
case
COLORSCALE_AUTOMIN
:
return
std
::
min
<
double
>
(
0
,
nMin
);
case
COLORSCALE_MAX
:
case
COLORSCALE_MAX
:
return
nMax
;
return
nMax
;
case
COLORSCALE_AUTOMAX
:
return
std
::
max
<
double
>
(
0
,
nMax
);
case
COLORSCALE_PERCENTILE
:
case
COLORSCALE_PERCENTILE
:
{
{
std
::
vector
<
double
>
aValues
;
std
::
vector
<
double
>
aValues
;
...
@@ -510,6 +514,8 @@ bool ScColorScaleFormat::CheckEntriesForRel(const ScRange& rRange) const
...
@@ -510,6 +514,8 @@ bool ScColorScaleFormat::CheckEntriesForRel(const ScRange& rRange) const
{
{
case
COLORSCALE_MIN
:
case
COLORSCALE_MIN
:
case
COLORSCALE_MAX
:
case
COLORSCALE_MAX
:
case
COLORSCALE_AUTOMIN
:
case
COLORSCALE_AUTOMAX
:
bNeedUpdate
=
true
;
bNeedUpdate
=
true
;
break
;
break
;
case
COLORSCALE_FORMULA
:
case
COLORSCALE_FORMULA
:
...
@@ -616,6 +622,8 @@ bool NeedUpdate(ScColorScaleEntry* pEntry)
...
@@ -616,6 +622,8 @@ bool NeedUpdate(ScColorScaleEntry* pEntry)
case
COLORSCALE_MIN
:
case
COLORSCALE_MIN
:
case
COLORSCALE_MAX
:
case
COLORSCALE_MAX
:
case
COLORSCALE_FORMULA
:
case
COLORSCALE_FORMULA
:
case
COLORSCALE_AUTOMIN
:
case
COLORSCALE_AUTOMAX
:
return
true
;
return
true
;
default
:
default
:
return
false
;
return
false
;
...
@@ -660,6 +668,9 @@ double ScDataBarFormat::getMin(double nMin, double nMax) const
...
@@ -660,6 +668,9 @@ double ScDataBarFormat::getMin(double nMin, double nMax) const
case
COLORSCALE_MIN
:
case
COLORSCALE_MIN
:
return
nMin
;
return
nMin
;
case
COLORSCALE_AUTOMIN
:
return
std
::
min
<
double
>
(
0
,
nMin
);
case
COLORSCALE_PERCENT
:
case
COLORSCALE_PERCENT
:
return
nMin
+
(
nMax
-
nMin
)
/
100
*
mpFormatData
->
mpLowerLimit
->
GetValue
();
return
nMin
+
(
nMax
-
nMin
)
/
100
*
mpFormatData
->
mpLowerLimit
->
GetValue
();
...
@@ -684,6 +695,8 @@ double ScDataBarFormat::getMax(double nMin, double nMax) const
...
@@ -684,6 +695,8 @@ double ScDataBarFormat::getMax(double nMin, double nMax) const
{
{
case
COLORSCALE_MAX
:
case
COLORSCALE_MAX
:
return
nMax
;
return
nMax
;
case
COLORSCALE_AUTOMAX
:
return
std
::
max
<
double
>
(
0
,
nMax
);
case
COLORSCALE_PERCENT
:
case
COLORSCALE_PERCENT
:
return
nMin
+
(
nMax
-
nMin
)
/
100
*
mpFormatData
->
mpUpperLimit
->
GetValue
();
return
nMin
+
(
nMax
-
nMin
)
/
100
*
mpFormatData
->
mpUpperLimit
->
GetValue
();
case
COLORSCALE_PERCENTILE
:
case
COLORSCALE_PERCENTILE
:
...
...
sc/source/filter/xml/xmlexprt.cxx
Dosyayı görüntüle @
06aeaad3
...
@@ -3800,6 +3800,10 @@ rtl::OUString getCondFormatEntryType(const ScColorScaleEntry& rEntry)
...
@@ -3800,6 +3800,10 @@ rtl::OUString getCondFormatEntryType(const ScColorScaleEntry& rEntry)
return
rtl
::
OUString
(
"formula"
);
return
rtl
::
OUString
(
"formula"
);
case
COLORSCALE_VALUE
:
case
COLORSCALE_VALUE
:
return
rtl
::
OUString
(
"number"
);
return
rtl
::
OUString
(
"number"
);
case
COLORSCALE_AUTOMIN
:
return
rtl
::
OUString
(
"auto-minimum"
);
case
COLORSCALE_AUTOMAX
:
return
rtl
::
OUString
(
"auto-maximum"
);
}
}
return
rtl
::
OUString
();
return
rtl
::
OUString
();
}
}
...
...
sc/source/ui/condformat/condformatdlg.cxx
Dosyayı görüntüle @
06aeaad3
...
@@ -80,6 +80,10 @@ void SetColorScaleEntryTypes( const ScColorScaleEntry& rEntry, ListBox& rLbType,
...
@@ -80,6 +80,10 @@ void SetColorScaleEntryTypes( const ScColorScaleEntry& rEntry, ListBox& rLbType,
rEdit
.
SetText
(
rtl
::
OUString
::
valueOf
(
rEntry
.
GetValue
()));
rEdit
.
SetText
(
rtl
::
OUString
::
valueOf
(
rEntry
.
GetValue
()));
rLbType
.
SelectEntryPos
(
3
);
rLbType
.
SelectEntryPos
(
3
);
break
;
break
;
case
COLORSCALE_AUTOMIN
:
break
;
case
COLORSCALE_AUTOMAX
:
break
;
}
}
rLbCol
.
SelectEntry
(
rEntry
.
GetColor
());
rLbCol
.
SelectEntry
(
rEntry
.
GetColor
());
}
}
...
@@ -109,6 +113,10 @@ void SetDataBarEntryTypes( const ScColorScaleEntry& rEntry, ListBox& rLbType, Ed
...
@@ -109,6 +113,10 @@ void SetDataBarEntryTypes( const ScColorScaleEntry& rEntry, ListBox& rLbType, Ed
rEdit
.
SetText
(
rtl
::
OUString
::
valueOf
(
rEntry
.
GetValue
()));
rEdit
.
SetText
(
rtl
::
OUString
::
valueOf
(
rEntry
.
GetValue
()));
rLbType
.
SelectEntryPos
(
3
);
rLbType
.
SelectEntryPos
(
3
);
break
;
break
;
case
COLORSCALE_AUTOMIN
:
break
;
case
COLORSCALE_AUTOMAX
:
break
;
}
}
}
}
...
...
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