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
f9f53c4a
Kaydet (Commit)
f9f53c4a
authored
Nis 16, 2015
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
support tint for databar and colorscale colors, related tdf#90511
Change-Id: I59b00ab856583ed08f70c9c90469bbb44cb5782a
üst
cb206383
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
10 deletions
+34
-10
condformatbuffer.hxx
sc/source/filter/inc/condformatbuffer.hxx
+2
-2
condformatbuffer.cxx
sc/source/filter/oox/condformatbuffer.cxx
+32
-8
No files found.
sc/source/filter/inc/condformatbuffer.hxx
Dosyayı görüntüle @
f9f53c4a
...
...
@@ -224,9 +224,9 @@ struct ExCfRuleModel
bool
mbGradient
;
OUString
maAxisPosition
;
// AxisColor
sal_Int32
mnAxisColor
;
sal_
u
Int32
mnAxisColor
;
// NegativeFillColor
sal_Int32
mnNegativeColor
;
sal_
u
Int32
mnNegativeColor
;
// Cfvo
bool
mbIsLower
;
OUString
maColorScaleType
;
...
...
sc/source/filter/oox/condformatbuffer.cxx
Dosyayı görüntüle @
f9f53c4a
...
...
@@ -161,29 +161,42 @@ void ColorScaleRule::importCfvo( const AttributeList& rAttribs )
namespace
{
::
Color
RgbToRgbComponents
(
sal_
Int32
&
nRgb
)
::
Color
ARgbToARgbComponents
(
sal_u
Int32
&
nRgb
)
{
sal_Int32
ornA
=
255
-
((
nRgb
>>
24
)
&
0xFF
);
sal_Int32
ornR
=
(
nRgb
>>
16
)
&
0xFF
;
sal_Int32
ornG
=
(
nRgb
>>
8
)
&
0xFF
;
sal_Int32
ornB
=
nRgb
&
0xFF
;
return
::
Color
(
ornR
,
ornG
,
ornB
);
return
::
Color
(
orn
A
,
orn
R
,
ornG
,
ornB
);
}
}
void
ColorScaleRule
::
importColor
(
const
AttributeList
&
rAttribs
)
{
sal_Int32
nColor
=
0
;
sal_
u
Int32
nColor
=
0
;
if
(
rAttribs
.
hasAttribute
(
XML_rgb
)
)
nColor
=
rAttribs
.
getIntegerHex
(
XML_rgb
,
API_RGB_TRANSPARENT
);
else
if
(
rAttribs
.
hasAttribute
(
XML_theme
)
)
{
sal_uInt32
nThemeIndex
=
rAttribs
.
getUnsigned
(
XML_theme
,
0
);
nColor
=
getTheme
().
getColorByIndex
(
nThemeIndex
);
}
::
Color
aColor
=
RgbToRgbComponents
(
nColor
);
::
Color
aColor
;
double
nTint
=
rAttribs
.
getDouble
(
XML_tint
,
0.0
);
if
(
nTint
!=
0.0
)
{
oox
::
drawingml
::
Color
aDMColor
;
aDMColor
.
setSrgbClr
(
nColor
);
aDMColor
.
addExcelTintTransformation
(
nTint
);
nColor
=
aDMColor
.
getColor
(
getBaseFilter
().
getGraphicHelper
());
aColor
=
::
Color
(
nColor
);
}
else
aColor
=
ARgbToARgbComponents
(
nColor
);
if
(
mnCol
>=
maColorScaleRuleEntries
.
size
())
maColorScaleRuleEntries
.
push_back
(
ColorScaleRuleModelEntry
());
...
...
@@ -239,7 +252,7 @@ DataBarRule::DataBarRule( const CondFormat& rFormat ):
void
DataBarRule
::
importColor
(
const
AttributeList
&
rAttribs
)
{
sal_Int32
nColor
=
0
;
sal_
u
Int32
nColor
=
0
;
if
(
rAttribs
.
hasAttribute
(
XML_rgb
)
)
nColor
=
rAttribs
.
getIntegerHex
(
XML_rgb
,
API_RGB_TRANSPARENT
);
else
if
(
rAttribs
.
hasAttribute
(
XML_theme
)
)
...
...
@@ -248,7 +261,18 @@ void DataBarRule::importColor( const AttributeList& rAttribs )
nColor
=
getTheme
().
getColorByIndex
(
nThemeIndex
);
}
::
Color
aColor
=
RgbToRgbComponents
(
nColor
);
::
Color
aColor
;
double
nTint
=
rAttribs
.
getDouble
(
XML_tint
,
0.0
);
if
(
nTint
!=
0.0
)
{
oox
::
drawingml
::
Color
aDMColor
;
aDMColor
.
setSrgbClr
(
nColor
);
aDMColor
.
addExcelTintTransformation
(
nTint
);
nColor
=
aDMColor
.
getColor
(
getBaseFilter
().
getGraphicHelper
());
aColor
=
::
Color
(
nColor
);
}
else
aColor
=
ARgbToARgbComponents
(
nColor
);
mxFormat
->
maPositiveColor
=
aColor
;
}
...
...
@@ -1119,13 +1143,13 @@ void ExtCfRule::finalizeImport()
case
AXISCOLOR
:
{
ScDataBarFormatData
*
pDataBar
=
mpTarget
;
pDataBar
->
maAxisColor
=
RgbTo
RgbComponents
(
maModel
.
mnAxisColor
);
pDataBar
->
maAxisColor
=
ARgbToA
RgbComponents
(
maModel
.
mnAxisColor
);
break
;
}
case
NEGATIVEFILLCOLOR
:
{
ScDataBarFormatData
*
pDataBar
=
mpTarget
;
pDataBar
->
mpNegativeColor
.
reset
(
new
::
Color
(
RgbTo
RgbComponents
(
maModel
.
mnNegativeColor
)
)
);
pDataBar
->
mpNegativeColor
.
reset
(
new
::
Color
(
ARgbToA
RgbComponents
(
maModel
.
mnNegativeColor
)
)
);
pDataBar
->
mbNeg
=
true
;
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