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
7ea6f476
Kaydet (Commit)
7ea6f476
authored
Tem 17, 2015
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
remove duplicated code
Change-Id: I4a5dcb9d05446dc938f978cb30428c70c70d6914
üst
24c0aafd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
53 deletions
+23
-53
ChartSeriesPanel.cxx
chart2/source/controller/sidebar/ChartSeriesPanel.cxx
+23
-53
No files found.
chart2/source/controller/sidebar/ChartSeriesPanel.cxx
Dosyayı görüntüle @
7ea6f476
...
@@ -261,6 +261,25 @@ OUString getSeriesLabel(css::uno::Reference<css::frame::XModel> xModel, const OU
...
@@ -261,6 +261,25 @@ OUString getSeriesLabel(css::uno::Reference<css::frame::XModel> xModel, const OU
return
DataSeriesHelper
::
getDataSeriesLabel
(
xSeries
,
xChartType
->
getRoleOfSequenceForSeriesLabel
());
return
DataSeriesHelper
::
getDataSeriesLabel
(
xSeries
,
xChartType
->
getRoleOfSequenceForSeriesLabel
());
}
}
OUString
getCID
(
css
::
uno
::
Reference
<
css
::
frame
::
XModel
>
xModel
)
{
css
::
uno
::
Reference
<
css
::
frame
::
XController
>
xController
(
xModel
->
getCurrentController
());
css
::
uno
::
Reference
<
css
::
view
::
XSelectionSupplier
>
xSelectionSupplier
(
xController
,
css
::
uno
::
UNO_QUERY
);
if
(
!
xSelectionSupplier
.
is
())
return
OUString
();
uno
::
Any
aAny
=
xSelectionSupplier
->
getSelection
();
assert
(
aAny
.
hasValue
());
OUString
aCID
;
aAny
>>=
aCID
;
#ifdef DBG_UTIL
ObjectType
eType
=
ObjectIdentifier
::
getObjectType
(
aCID
);
assert
(
eType
==
OBJECTTYPE_DATA_SERIES
);
#endif
return
aCID
;
}
}
}
ChartSeriesPanel
::
ChartSeriesPanel
(
ChartSeriesPanel
::
ChartSeriesPanel
(
...
@@ -334,19 +353,7 @@ void ChartSeriesPanel::Initialize()
...
@@ -334,19 +353,7 @@ void ChartSeriesPanel::Initialize()
void
ChartSeriesPanel
::
updateData
()
void
ChartSeriesPanel
::
updateData
()
{
{
css
::
uno
::
Reference
<
css
::
frame
::
XController
>
xController
(
mxModel
->
getCurrentController
());
OUString
aCID
=
getCID
(
mxModel
);
css
::
uno
::
Reference
<
css
::
view
::
XSelectionSupplier
>
xSelectionSupplier
(
xController
,
css
::
uno
::
UNO_QUERY
);
if
(
!
xSelectionSupplier
.
is
())
return
;
uno
::
Any
aAny
=
xSelectionSupplier
->
getSelection
();
assert
(
aAny
.
hasValue
());
OUString
aCID
;
aAny
>>=
aCID
;
#ifdef DBG_UTIL
ObjectType
eType
=
ObjectIdentifier
::
getObjectType
(
aCID
);
assert
(
eType
==
OBJECTTYPE_DATA_SERIES
);
#endif
SolarMutexGuard
aGuard
;
SolarMutexGuard
aGuard
;
bool
bLabelVisible
=
isDataLabelVisible
(
mxModel
,
aCID
);
bool
bLabelVisible
=
isDataLabelVisible
(
mxModel
,
aCID
);
mpCBLabel
->
Check
(
bLabelVisible
);
mpCBLabel
->
Check
(
bLabelVisible
);
...
@@ -406,19 +413,7 @@ void ChartSeriesPanel::modelInvalid()
...
@@ -406,19 +413,7 @@ void ChartSeriesPanel::modelInvalid()
IMPL_LINK
(
ChartSeriesPanel
,
CheckBoxHdl
,
CheckBox
*
,
pCheckBox
)
IMPL_LINK
(
ChartSeriesPanel
,
CheckBoxHdl
,
CheckBox
*
,
pCheckBox
)
{
{
bool
bChecked
=
pCheckBox
->
IsChecked
();
bool
bChecked
=
pCheckBox
->
IsChecked
();
css
::
uno
::
Reference
<
css
::
frame
::
XController
>
xController
(
mxModel
->
getCurrentController
());
OUString
aCID
=
getCID
(
mxModel
);
css
::
uno
::
Reference
<
css
::
view
::
XSelectionSupplier
>
xSelectionSupplier
(
xController
,
css
::
uno
::
UNO_QUERY
);
if
(
!
xSelectionSupplier
.
is
())
return
0
;
uno
::
Any
aAny
=
xSelectionSupplier
->
getSelection
();
assert
(
aAny
.
hasValue
());
OUString
aCID
;
aAny
>>=
aCID
;
#ifdef DBG_UTIL
ObjectType
eType
=
ObjectIdentifier
::
getObjectType
(
aCID
);
assert
(
eType
==
OBJECTTYPE_DATA_SERIES
);
#endif
if
(
pCheckBox
==
mpCBLabel
.
get
())
if
(
pCheckBox
==
mpCBLabel
.
get
())
setDataLabelVisible
(
mxModel
,
aCID
,
bChecked
);
setDataLabelVisible
(
mxModel
,
aCID
,
bChecked
);
else
if
(
pCheckBox
==
mpCBTrendline
.
get
())
else
if
(
pCheckBox
==
mpCBTrendline
.
get
())
...
@@ -433,20 +428,7 @@ IMPL_LINK(ChartSeriesPanel, CheckBoxHdl, CheckBox*, pCheckBox)
...
@@ -433,20 +428,7 @@ IMPL_LINK(ChartSeriesPanel, CheckBoxHdl, CheckBox*, pCheckBox)
IMPL_LINK_NOARG
(
ChartSeriesPanel
,
RadioBtnHdl
)
IMPL_LINK_NOARG
(
ChartSeriesPanel
,
RadioBtnHdl
)
{
{
css
::
uno
::
Reference
<
css
::
frame
::
XController
>
xController
(
mxModel
->
getCurrentController
());
OUString
aCID
=
getCID
(
mxModel
);
css
::
uno
::
Reference
<
css
::
view
::
XSelectionSupplier
>
xSelectionSupplier
(
xController
,
css
::
uno
::
UNO_QUERY
);
if
(
!
xSelectionSupplier
.
is
())
return
0
;
uno
::
Any
aAny
=
xSelectionSupplier
->
getSelection
();
assert
(
aAny
.
hasValue
());
OUString
aCID
;
aAny
>>=
aCID
;
#ifdef DBG_UTIL
ObjectType
eType
=
ObjectIdentifier
::
getObjectType
(
aCID
);
assert
(
eType
==
OBJECTTYPE_DATA_SERIES
);
#endif
bool
bChecked
=
mpRBPrimaryAxis
->
IsChecked
();
bool
bChecked
=
mpRBPrimaryAxis
->
IsChecked
();
setAttachedAxisType
(
mxModel
,
aCID
,
bChecked
);
setAttachedAxisType
(
mxModel
,
aCID
,
bChecked
);
...
@@ -456,19 +438,7 @@ IMPL_LINK_NOARG(ChartSeriesPanel, RadioBtnHdl)
...
@@ -456,19 +438,7 @@ IMPL_LINK_NOARG(ChartSeriesPanel, RadioBtnHdl)
IMPL_LINK_NOARG
(
ChartSeriesPanel
,
ListBoxHdl
)
IMPL_LINK_NOARG
(
ChartSeriesPanel
,
ListBoxHdl
)
{
{
css
::
uno
::
Reference
<
css
::
frame
::
XController
>
xController
(
mxModel
->
getCurrentController
());
OUString
aCID
=
getCID
(
mxModel
);
css
::
uno
::
Reference
<
css
::
view
::
XSelectionSupplier
>
xSelectionSupplier
(
xController
,
css
::
uno
::
UNO_QUERY
);
if
(
!
xSelectionSupplier
.
is
())
return
0
;
uno
::
Any
aAny
=
xSelectionSupplier
->
getSelection
();
assert
(
aAny
.
hasValue
());
OUString
aCID
;
aAny
>>=
aCID
;
#ifdef DBG_UTIL
ObjectType
eType
=
ObjectIdentifier
::
getObjectType
(
aCID
);
assert
(
eType
==
OBJECTTYPE_DATA_SERIES
);
#endif
sal_Int32
nPos
=
mpLBLabelPlacement
->
GetSelectEntryPos
();
sal_Int32
nPos
=
mpLBLabelPlacement
->
GetSelectEntryPos
();
setDataLabelPlacement
(
mxModel
,
aCID
,
nPos
);
setDataLabelPlacement
(
mxModel
,
aCID
,
nPos
);
...
...
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