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
d550cdb9
Kaydet (Commit)
d550cdb9
authored
Eki 22, 2015
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
implement text rotation for chart axis sidebar panel, tdf#94970
Change-Id: Ifce97c437238bd1520a2122aa4027a1bcbba1e5d
üst
0348b94b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
2 deletions
+45
-2
ChartAxisPanel.cxx
chart2/source/controller/sidebar/ChartAxisPanel.cxx
+41
-1
ChartAxisPanel.hxx
chart2/source/controller/sidebar/ChartAxisPanel.hxx
+4
-1
No files found.
chart2/source/controller/sidebar/ChartAxisPanel.cxx
Dosyayı görüntüle @
d550cdb9
...
...
@@ -181,6 +181,33 @@ OUString getCID(css::uno::Reference<css::frame::XModel> xModel)
return
aCID
;
}
void
setAxisRotation
(
css
::
uno
::
Reference
<
css
::
frame
::
XModel
>
xModel
,
const
OUString
&
rCID
,
double
nVal
)
{
css
::
uno
::
Reference
<
css
::
beans
::
XPropertySet
>
xAxis
(
ObjectIdentifier
::
getAxisForCID
(
rCID
,
xModel
),
uno
::
UNO_QUERY
);
if
(
!
xAxis
.
is
())
return
;
xAxis
->
setPropertyValue
(
"TextRotation"
,
css
::
uno
::
makeAny
(
nVal
));
}
double
getAxisRotation
(
css
::
uno
::
Reference
<
css
::
frame
::
XModel
>
xModel
,
const
OUString
&
rCID
)
{
css
::
uno
::
Reference
<
css
::
beans
::
XPropertySet
>
xAxis
(
ObjectIdentifier
::
getAxisForCID
(
rCID
,
xModel
),
uno
::
UNO_QUERY
);
if
(
!
xAxis
.
is
())
return
0
;
css
::
uno
::
Any
aAny
=
xAxis
->
getPropertyValue
(
"TextRotation"
);
double
nVal
=
0
;
aAny
>>=
nVal
;
return
nVal
;
}
}
ChartAxisPanel
::
ChartAxisPanel
(
...
...
@@ -198,7 +225,7 @@ ChartAxisPanel::ChartAxisPanel(
get
(
mpCBReverse
,
"checkbutton_reverse"
);
get
(
mpLBLabelPos
,
"comboboxtext_label_position"
);
//FIXME: add text orientation spinbox + its handler
get
(
mpNFRotation
,
"spinbutton1"
);
get
(
mpGridLabel
,
"label_props"
);
Initialize
();
...
...
@@ -224,6 +251,8 @@ void ChartAxisPanel::dispose()
mpLBLabelPos
.
clear
();
mpGridLabel
.
clear
();
mpNFRotation
.
clear
();
PanelLayout
::
dispose
();
}
...
...
@@ -242,6 +271,9 @@ void ChartAxisPanel::Initialize()
mpCBShowLabel
->
SetClickHdl
(
aLink
);
mpCBReverse
->
SetClickHdl
(
aLink
);
Link
<
Edit
&
,
void
>
aSpinButtonLink
=
LINK
(
this
,
ChartAxisPanel
,
TextRotationHdl
);
mpNFRotation
->
SetModifyHdl
(
aSpinButtonLink
);
mpLBLabelPos
->
SetSelectHdl
(
LINK
(
this
,
ChartAxisPanel
,
ListBoxHdl
));
}
...
...
@@ -257,6 +289,7 @@ void ChartAxisPanel::updateData()
mpCBReverse
->
Check
(
isReverse
(
mxModel
,
aCID
));
mpLBLabelPos
->
SelectEntryPos
(
getLabelPosition
(
mxModel
,
aCID
));
mpNFRotation
->
SetValue
(
getAxisRotation
(
mxModel
,
aCID
));
}
VclPtr
<
vcl
::
Window
>
ChartAxisPanel
::
Create
(
...
...
@@ -351,6 +384,13 @@ IMPL_LINK_NOARG_TYPED(ChartAxisPanel, ListBoxHdl, ListBox&, void)
setLabelPosition
(
mxModel
,
aCID
,
nPos
);
}
IMPL_LINK_TYPED
(
ChartAxisPanel
,
TextRotationHdl
,
Edit
&
,
rMetricField
,
void
)
{
OUString
aCID
=
getCID
(
mxModel
);
double
nVal
=
static_cast
<
NumericField
&>
(
rMetricField
).
GetValue
();
setAxisRotation
(
mxModel
,
aCID
,
nVal
);
}
}}
// end of namespace ::chart::sidebar
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
chart2/source/controller/sidebar/ChartAxisPanel.hxx
Dosyayı görüntüle @
d550cdb9
...
...
@@ -25,7 +25,7 @@
class
FixedText
;
class
ListBox
;
class
Nume
ricField
;
class
Met
ricField
;
namespace
chart
{
...
...
@@ -82,6 +82,8 @@ private:
VclPtr
<
ListBox
>
mpLBLabelPos
;
VclPtr
<
VclGrid
>
mpGridLabel
;
VclPtr
<
MetricField
>
mpNFRotation
;
css
::
uno
::
Reference
<
css
::
frame
::
XFrame
>
mxFrame
;
css
::
uno
::
Reference
<
css
::
frame
::
XModel
>
mxModel
;
...
...
@@ -94,6 +96,7 @@ private:
DECL_LINK_TYPED
(
CheckBoxHdl
,
Button
*
,
void
);
DECL_LINK_TYPED
(
ListBoxHdl
,
ListBox
&
,
void
);
DECL_LINK_TYPED
(
TextRotationHdl
,
Edit
&
,
void
);
};
}
}
// 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