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
7d1fa5fb
Kaydet (Commit)
7d1fa5fb
authored
Mar 24, 2015
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
add minLength and maxLength support to databars
Change-Id: Idbbc4b64b616ead6ef880340064623b9a5c0ff51
üst
0dc9317d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
3 deletions
+23
-3
colorscale.hxx
sc/inc/colorscale.hxx
+14
-0
colorscale.cxx
sc/source/core/data/colorscale.cxx
+5
-3
xecontent.cxx
sc/source/filter/excel/xecontent.cxx
+2
-0
condformatbuffer.cxx
sc/source/filter/oox/condformatbuffer.cxx
+2
-0
No files found.
sc/inc/colorscale.hxx
Dosyayı görüntüle @
7d1fa5fb
...
...
@@ -101,6 +101,8 @@ struct SC_DLLPUBLIC ScDataBarFormatData
mbGradient
(
true
),
mbNeg
(
true
),
meAxisPosition
(
databar
::
AUTOMATIC
),
mnMinLength
(
0
),
mnMaxLength
(
100
),
mbOnlyBar
(
false
){}
ScDataBarFormatData
(
const
ScDataBarFormatData
&
r
)
:
...
...
@@ -109,6 +111,8 @@ struct SC_DLLPUBLIC ScDataBarFormatData
mbGradient
(
r
.
mbGradient
),
mbNeg
(
r
.
mbNeg
),
meAxisPosition
(
r
.
meAxisPosition
),
mnMinLength
(
r
.
mnMinLength
),
mnMaxLength
(
r
.
mnMaxLength
),
mbOnlyBar
(
r
.
mbOnlyBar
)
{
if
(
r
.
mpNegativeColor
)
...
...
@@ -157,6 +161,16 @@ struct SC_DLLPUBLIC ScDataBarFormatData
* Default is false
*/
databar
::
ScAxisPosition
meAxisPosition
;
/**
* Minimal length of a databar in percent of cell length
* Value has to be in the range [0, 100)
*/
double
mnMinLength
;
/**
* Maximal length of a databar in percent of cell length
* Value has to be in the range (0, 100]
*/
double
mnMaxLength
;
/**
* If TRUE we only show the bar and not the value
...
...
sc/source/core/data/colorscale.cxx
Dosyayı görüntüle @
7d1fa5fb
...
...
@@ -838,6 +838,8 @@ ScDataBarInfo* ScDataBarFormat::GetDataBarInfo(const ScAddress& rAddr) const
double
nValMax
=
getMaxValue
();
double
nMin
=
getMin
(
nValMin
,
nValMax
);
double
nMax
=
getMax
(
nValMin
,
nValMax
);
double
nMinLength
=
mpFormatData
->
mnMinLength
;
double
nMaxLength
=
mpFormatData
->
mnMaxLength
;
double
nValue
=
mpDoc
->
GetValue
(
rAddr
);
...
...
@@ -846,16 +848,16 @@ ScDataBarInfo* ScDataBarFormat::GetDataBarInfo(const ScAddress& rAddr) const
{
if
(
nValue
<=
nMin
)
{
pInfo
->
mnLength
=
0
;
pInfo
->
mnLength
=
nMinLength
;
}
else
if
(
nValue
>=
nMax
)
{
pInfo
->
mnLength
=
100
;
pInfo
->
mnLength
=
nMaxLength
;
}
else
{
double
nDiff
=
nMax
-
nMin
;
pInfo
->
mnLength
=
(
nValue
-
nMin
)
/
nDiff
*
100.0
;
pInfo
->
mnLength
=
nMinLength
+
(
nValue
-
nMin
)
/
nDiff
*
(
nMaxLength
-
nMinLength
)
;
}
pInfo
->
mnZero
=
0
;
}
...
...
sc/source/filter/excel/xecontent.cxx
Dosyayı görüntüle @
7d1fa5fb
...
...
@@ -1300,6 +1300,8 @@ void XclExpDataBar::SaveXml( XclExpXmlStream& rStrm )
rWorksheet
->
startElement
(
XML_dataBar
,
XML_showValue
,
OString
::
number
(
!
mrFormat
.
GetDataBarData
()
->
mbOnlyBar
),
XML_minLength
,
OString
::
number
(
sal_uInt32
(
mrFormat
.
GetDataBarData
()
->
mnMinLength
)),
XML_maxLength
,
OString
::
number
(
sal_uInt32
(
mrFormat
.
GetDataBarData
()
->
mnMaxLength
)),
FSEND
);
mpCfvoLowerLimit
->
SaveXml
(
rStrm
);
...
...
sc/source/filter/oox/condformatbuffer.cxx
Dosyayı görüntüle @
7d1fa5fb
...
...
@@ -273,6 +273,8 @@ void DataBarRule::importCfvo( const AttributeList& rAttribs )
void
DataBarRule
::
importAttribs
(
const
AttributeList
&
rAttribs
)
{
mxFormat
->
mbOnlyBar
=
!
rAttribs
.
getBool
(
XML_showValue
,
true
);
mxFormat
->
mnMinLength
=
rAttribs
.
getUnsigned
(
XML_minLength
,
10
);
mxFormat
->
mnMaxLength
=
rAttribs
.
getUnsigned
(
XML_maxLength
,
90
);
}
void
DataBarRule
::
SetData
(
ScDataBarFormat
*
pFormat
,
ScDocument
*
pDoc
,
const
ScAddress
&
rAddr
)
...
...
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