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
c296eec2
Kaydet (Commit)
c296eec2
authored
Tem 15, 2015
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
react to changing the checkboxes: axis
Change-Id: Ic1296b9035dce00837b8e8d24cc63e1d9bda0b88
üst
d380dbbc
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
0 deletions
+57
-0
ChartElementsPanel.cxx
chart2/source/controller/sidebar/ChartElementsPanel.cxx
+55
-0
ChartElementsPanel.hxx
chart2/source/controller/sidebar/ChartElementsPanel.hxx
+2
-0
No files found.
chart2/source/controller/sidebar/ChartElementsPanel.cxx
Dosyayı görüntüle @
c296eec2
...
...
@@ -31,6 +31,7 @@
#include <vcl/toolbox.hxx>
#include <svl/intitem.hxx>
#include <svl/stritem.hxx>
#include <comphelper/processfactory.hxx>
#include "LegendHelper.hxx"
#include "TitleHelper.hxx"
...
...
@@ -174,7 +175,26 @@ bool isAxisVisible(css::uno::Reference<css::frame::XModel> xModel, AxisType eTyp
return
bHasAxis
;
}
return
false
;
}
void
setAxisVisible
(
css
::
uno
::
Reference
<
css
::
frame
::
XModel
>
xModel
,
AxisType
eType
,
bool
bVisible
)
{
Reference
<
chart2
::
XDiagram
>
xDiagram
(
ChartModelHelper
::
findDiagram
(
xModel
));
if
(
xDiagram
.
is
())
{
sal_Int32
nDimensionIndex
=
0
;
if
(
eType
==
AxisType
::
Y_MAIN
||
eType
==
AxisType
::
Y_SECOND
)
nDimensionIndex
=
1
;
else
if
(
eType
==
AxisType
::
Z_MAIN
)
nDimensionIndex
=
2
;
bool
bMajor
=
!
(
eType
==
AxisType
::
X_SECOND
||
eType
==
AxisType
::
Y_SECOND
);
if
(
bVisible
)
AxisHelper
::
showAxis
(
nDimensionIndex
,
bMajor
,
xDiagram
,
comphelper
::
getProcessComponentContext
());
else
AxisHelper
::
hideAxis
(
nDimensionIndex
,
bMajor
,
xDiagram
);
}
}
}
...
...
@@ -246,6 +266,23 @@ void ChartElementsPanel::Initialize()
css
::
uno
::
Reference
<
css
::
util
::
XModifyBroadcaster
>
xBroadcaster
(
mxModel
,
css
::
uno
::
UNO_QUERY_THROW
);
xBroadcaster
->
addModifyListener
(
mxListener
);
updateData
();
Link
<>
aLink
=
LINK
(
this
,
ChartElementsPanel
,
CheckBoxHdl
);
mpCBTitle
->
SetClickHdl
(
aLink
);
mpCBSubtitle
->
SetClickHdl
(
aLink
);
mpCBXAxis
->
SetClickHdl
(
aLink
);
mpCBXAxisTitle
->
SetClickHdl
(
aLink
);
mpCBYAxis
->
SetClickHdl
(
aLink
);
mpCBYAxisTitle
->
SetClickHdl
(
aLink
);
mpCBZAxis
->
SetClickHdl
(
aLink
);
mpCBZAxisTitle
->
SetClickHdl
(
aLink
);
mpCB2ndXAxis
->
SetClickHdl
(
aLink
);
mpCB2ndXAxisTitle
->
SetClickHdl
(
aLink
);
mpCB2ndYAxis
->
SetClickHdl
(
aLink
);
mpCB2ndYAxisTitle
->
SetClickHdl
(
aLink
);
mpCBLegend
->
SetClickHdl
(
aLink
);
mpCBGridVertical
->
SetClickHdl
(
aLink
);
mpCBGridHorizontal
->
SetClickHdl
(
aLink
);
}
void
ChartElementsPanel
::
updateData
()
...
...
@@ -317,6 +354,24 @@ void ChartElementsPanel::modelInvalid()
}
IMPL_LINK
(
ChartElementsPanel
,
CheckBoxHdl
,
CheckBox
*
,
pCheckBox
)
{
bool
bChecked
=
pCheckBox
->
IsChecked
();
if
(
pCheckBox
==
mpCBTitle
.
get
())
{
}
else
if
(
pCheckBox
==
mpCBXAxis
.
get
())
setAxisVisible
(
mxModel
,
AxisType
::
X_MAIN
,
bChecked
);
else
if
(
pCheckBox
==
mpCBYAxis
.
get
())
setAxisVisible
(
mxModel
,
AxisType
::
Y_MAIN
,
bChecked
);
else
if
(
pCheckBox
==
mpCB2ndXAxis
.
get
())
setAxisVisible
(
mxModel
,
AxisType
::
X_SECOND
,
bChecked
);
else
if
(
pCheckBox
==
mpCB2ndYAxis
.
get
())
setAxisVisible
(
mxModel
,
AxisType
::
Y_SECOND
,
bChecked
);
return
0
;
}
}}
// end of namespace ::chart::sidebar
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
chart2/source/controller/sidebar/ChartElementsPanel.hxx
Dosyayı görüntüle @
c296eec2
...
...
@@ -98,6 +98,8 @@ private:
css
::
uno
::
Reference
<
css
::
util
::
XModifyListener
>
mxListener
;
void
Initialize
();
DECL_LINK
(
CheckBoxHdl
,
CheckBox
*
);
};
}
}
// end of namespace ::chart::sidebar
...
...
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