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
2390d3b6
Kaydet (Commit)
2390d3b6
authored
Nis 02, 2015
tarafından
Benjamin Ni
Kaydeden (comit)
Markus Mohrhard
Nis 03, 2015
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
added UI part for minLength and maxLength databar property, tdf#90197
Change-Id: I82a3655864b56d9b749e85443ca10ea9ab7a0c36
üst
b24a15a0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
150 additions
and
2 deletions
+150
-2
colorformat.cxx
sc/source/ui/condformat/colorformat.cxx
+54
-1
colorformat.hxx
sc/source/ui/inc/colorformat.hxx
+4
-0
databaroptions.ui
sc/uiconfig/scalc/ui/databaroptions.ui
+92
-1
No files found.
sc/source/ui/condformat/colorformat.cxx
Dosyayı görüntüle @
2390d3b6
...
...
@@ -77,6 +77,8 @@ ScDataBarSettingsDlg::ScDataBarSettingsDlg(vcl::Window* pWindow, const ScDataBar
get
(
mpLbAxisCol
,
"axis_colour"
);
get
(
mpEdMin
,
"min_value"
);
get
(
mpEdMax
,
"max_value"
);
get
(
mpLenMin
,
"min_length"
);
get
(
mpLenMax
,
"max_length"
);
maStrWarnSameValue
=
get
<
FixedText
>
(
"str_same_value"
)
->
GetText
();
...
...
@@ -103,9 +105,12 @@ ScDataBarSettingsDlg::ScDataBarSettingsDlg(vcl::Window* pWindow, const ScDataBar
::
SetType
(
rData
.
mpUpperLimit
.
get
(),
*
mpLbTypeMax
);
SetValue
(
rData
.
mpLowerLimit
.
get
(),
*
mpEdMin
);
SetValue
(
rData
.
mpUpperLimit
.
get
(),
*
mpEdMax
);
mpLenMin
->
SetText
(
OUString
::
number
(
rData
.
mnMinLength
));
mpLenMax
->
SetText
(
OUString
::
number
(
rData
.
mnMaxLength
));
mpLbAxisCol
->
SelectEntry
(
rData
.
maAxisColor
);
TypeSelectHdl
(
NULL
);
PosSelectHdl
(
NULL
);
}
void
ScDataBarSettingsDlg
::
Init
()
...
...
@@ -150,6 +155,7 @@ void ScDataBarSettingsDlg::Init()
mpLbTypeMin
->
SetSelectHdl
(
LINK
(
this
,
ScDataBarSettingsDlg
,
TypeSelectHdl
)
);
mpLbTypeMax
->
SetSelectHdl
(
LINK
(
this
,
ScDataBarSettingsDlg
,
TypeSelectHdl
)
);
mpLbAxisPos
->
SetSelectHdl
(
LINK
(
this
,
ScDataBarSettingsDlg
,
PosSelectHdl
)
);
}
...
...
@@ -171,6 +177,18 @@ void GetAxesPosition(ScDataBarFormatData* pData, const ListBox* rLbox)
}
}
void
SetBarLength
(
ScDataBarFormatData
*
pData
,
OUString
minStr
,
OUString
maxStr
,
SvNumberFormatter
*
mpNumberFormatter
)
{
double
nMinValue
=
0
;
sal_uInt32
nIndex
=
0
;
(
void
)
mpNumberFormatter
->
IsNumberFormat
(
minStr
,
nIndex
,
nMinValue
);
nIndex
=
0
;
double
nMaxValue
=
0
;
(
void
)
mpNumberFormatter
->
IsNumberFormat
(
maxStr
,
nIndex
,
nMaxValue
);
pData
->
mnMinLength
=
nMinValue
;
pData
->
mnMaxLength
=
nMaxValue
;
}
}
ScDataBarFormatData
*
ScDataBarSettingsDlg
::
GetData
()
...
...
@@ -186,6 +204,7 @@ ScDataBarFormatData* ScDataBarSettingsDlg::GetData()
::
GetType
(
*
mpLbTypeMin
,
*
mpEdMin
,
pData
->
mpLowerLimit
.
get
(),
mpNumberFormatter
,
mpDoc
,
maPos
);
::
GetType
(
*
mpLbTypeMax
,
*
mpEdMax
,
pData
->
mpUpperLimit
.
get
(),
mpNumberFormatter
,
mpDoc
,
maPos
);
GetAxesPosition
(
pData
,
mpLbAxisPos
);
SetBarLength
(
pData
,
mpLenMin
->
GetText
(),
mpLenMax
->
GetText
(),
mpNumberFormatter
);
return
pData
;
}
...
...
@@ -200,7 +219,19 @@ IMPL_LINK_NOARG( ScDataBarSettingsDlg, OkBtnHdl )
sal_Int32
nSelectMax
=
mpLbTypeMax
->
GetSelectEntryPos
();
if
(
nSelectMax
==
COLORSCALE_MIN
)
bWarn
=
true
;
if
(
!
bWarn
)
// databar length checks
{
OUString
aMinString
=
mpLenMin
->
GetText
();
OUString
aMaxString
=
mpLenMax
->
GetText
();
double
nMinValue
=
0
;
sal_uInt32
nIndex
=
0
;
(
void
)
mpNumberFormatter
->
IsNumberFormat
(
aMinString
,
nIndex
,
nMinValue
);
nIndex
=
0
;
double
nMaxValue
=
0
;
(
void
)
mpNumberFormatter
->
IsNumberFormat
(
aMaxString
,
nIndex
,
nMaxValue
);
if
(
rtl
::
math
::
approxEqual
(
nMinValue
,
nMaxValue
)
||
nMinValue
>
nMaxValue
||
nMaxValue
>
100
||
nMinValue
<
0
)
bWarn
=
true
;
}
if
(
!
bWarn
&&
mpLbTypeMin
->
GetSelectEntryPos
()
==
mpLbTypeMax
->
GetSelectEntryPos
())
{
...
...
@@ -266,4 +297,26 @@ IMPL_LINK_NOARG( ScDataBarSettingsDlg, TypeSelectHdl )
return
0
;
}
IMPL_LINK_NOARG
(
ScDataBarSettingsDlg
,
PosSelectHdl
)
{
sal_Int32
axisPos
=
mpLbAxisPos
->
GetSelectEntryPos
();
if
(
axisPos
!=
2
)
// disable if axis vertical position is anything other than none
{
mpLenMin
->
Disable
();
mpLenMax
->
Disable
();
}
else
{
mpLenMin
->
Enable
();
mpLenMax
->
Enable
();
if
(
mpLenMin
->
GetText
().
isEmpty
())
{
mpLenMin
->
SetText
(
OUString
::
number
(
0
));
mpLenMax
->
SetText
(
OUString
::
number
(
100
));
}
}
return
0
;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sc/source/ui/inc/colorformat.hxx
Dosyayı görüntüle @
2390d3b6
...
...
@@ -37,6 +37,8 @@ private:
Edit
*
mpEdMin
;
Edit
*
mpEdMax
;
Edit
*
mpLenMin
;
Edit
*
mpLenMax
;
OUString
maStrWarnSameValue
;
SvNumberFormatter
*
mpNumberFormatter
;
...
...
@@ -46,6 +48,7 @@ private:
DECL_LINK
(
OkBtnHdl
,
void
*
);
DECL_LINK
(
TypeSelectHdl
,
void
*
);
DECL_LINK
(
PosSelectHdl
,
void
*
);
void
Init
();
...
...
@@ -58,3 +61,4 @@ public:
#endif // INCLUDED_SC_SOURCE_UI_INC_COLORFORMAT_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sc/uiconfig/scalc/ui/databaroptions.ui
Dosyayı görüntüle @
2390d3b6
...
...
@@ -406,6 +406,97 @@
</packing>
</child>
<child>
<object
class=
"GtkFrame"
id=
"frame4"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label_xalign"
>
0
</property>
<property
name=
"shadow_type"
>
none
</property>
<child>
<object
class=
"GtkAlignment"
id=
"alignment3"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"top_padding"
>
6
</property>
<property
name=
"left_padding"
>
12
</property>
<child>
<object
class=
"GtkGrid"
id=
"grid3"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"hexpand"
>
True
</property>
<property
name=
"vexpand"
>
True
</property>
<property
name=
"row_spacing"
>
6
</property>
<property
name=
"column_spacing"
>
6
</property>
<child>
<object
class=
"GtkLabel"
id=
"label10"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"halign"
>
end
</property>
<property
name=
"label"
translatable=
"yes"
>
Minimum bar length (%):
</property>
<property
name=
"use_underline"
>
True
</property>
<property
name=
"mnemonic_widget"
>
minLength
</property>
</object>
<packing>
<property
name=
"left_attach"
>
0
</property>
<property
name=
"top_attach"
>
0
</property>
</packing>
</child>
<child>
<object
class=
"GtkLabel"
id=
"label11"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"halign"
>
end
</property>
<property
name=
"label"
translatable=
"yes"
>
Maximum bar length (%):
</property>
<property
name=
"use_underline"
>
True
</property>
<property
name=
"mnemonic_widget"
>
maxLength
</property>
</object>
<packing>
<property
name=
"left_attach"
>
0
</property>
<property
name=
"top_attach"
>
1
</property>
</packing>
</child>
<child>
<object
class=
"GtkEntry"
id=
"min_length"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"invisible_char"
>
●
</property>
</object>
<packing>
<property
name=
"left_attach"
>
1
</property>
<property
name=
"top_attach"
>
0
</property>
</packing>
</child>
<child>
<object
class=
"GtkEntry"
id=
"max_length"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"invisible_char"
>
●
</property>
</object>
<packing>
<property
name=
"left_attach"
>
1
</property>
<property
name=
"top_attach"
>
1
</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child
type=
"label"
>
<object
class=
"GtkLabel"
id=
"label12"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
Bar lengths
</property>
<attributes>
<attribute
name=
"weight"
value=
"bold"
/>
</attributes>
</object>
</child>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
3
</property>
</packing>
<object
class=
"GtkLabel"
id=
"str_same_value"
>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
Min value must be smaller than max value!
</property>
...
...
@@ -414,7 +505,7 @@
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
3
</property>
<property
name=
"position"
>
4
</property>
</packing>
</child>
</object>
...
...
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