[Libreoffice-commits] core.git: Branch 'private/moggi/chart-opengl2' - chart2/source
Markus Mohrhard
markus.mohrhard at googlemail.com
Tue Dec 31 05:07:15 PST 2013
chart2/source/controller/dialogs/tp_RangeChooser.cxx | 10 ++++++++++
chart2/source/controller/dialogs/tp_RangeChooser.hrc | 2 ++
chart2/source/controller/dialogs/tp_RangeChooser.hxx | 2 ++
chart2/source/controller/dialogs/tp_RangeChooser.src | 6 ++++++
4 files changed, 20 insertions(+)
New commits:
commit 519152d5ca3d1919522c9993d468d0dcf3ebbd76
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Tue Dec 31 16:05:10 2013 +0100
add time based option to UI
we still need to notify ChartModel but I have no idea how
Change-Id: Iac5e09f2bdbcb1d4bc18d4a9dcc30db3a7ab36af
diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.cxx b/chart2/source/controller/dialogs/tp_RangeChooser.cxx
index 2eb5f5e..a7e429e 100644
--- a/chart2/source/controller/dialogs/tp_RangeChooser.cxx
+++ b/chart2/source/controller/dialogs/tp_RangeChooser.cxx
@@ -89,6 +89,7 @@ RangeChooserTabPage::RangeChooserTabPage( Window* pParent
, m_aRB_Columns( this, SchResId( RB_DATACOLS ) )
, m_aCB_FirstRowAsLabel( this, SchResId( CB_FIRST_ROW_ASLABELS ) )
, m_aCB_FirstColumnAsLabel( this, SchResId( CB_FIRST_COLUMN_ASLABELS ) )
+ , m_aCB_TimeBased( this, SchResId( CB_TIME_BASED ) )
, m_nChangingControlCalls(0)
, m_bIsDirty(false)
, m_xDataProvider( 0 )
@@ -241,11 +242,20 @@ void RangeChooserTabPage::changeDialogModelAccordingToControls()
|| ( m_aCB_FirstRowAsLabel.IsChecked() && !m_aRB_Rows.IsChecked() );
sal_Bool bHasCategories = ( m_aCB_FirstColumnAsLabel.IsChecked() && m_aRB_Columns.IsChecked() )
|| ( m_aCB_FirstRowAsLabel.IsChecked() && m_aRB_Rows.IsChecked() );
+ sal_Bool bTimeBased = m_aCB_TimeBased.IsChecked();
Sequence< beans::PropertyValue > aArguments(
DataSourceHelper::createArguments(
m_aRB_Columns.IsChecked(), bFirstCellAsLabel, bHasCategories ) );
+ if(bTimeBased)
+ {
+ aArguments.realloc( aArguments.getLength() + 1 );
+ aArguments[aArguments.getLength() - 1] =
+ beans::PropertyValue( "TimeBased", -1, uno::makeAny(bTimeBased),
+ beans::PropertyState_DIRECT_VALUE );
+ }
+
// only if range is valid
if( m_aLastValidRangeString.equals(m_aED_Range.GetText()))
{
diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.hrc b/chart2/source/controller/dialogs/tp_RangeChooser.hrc
index b9953ba..7d7e6ba 100644
--- a/chart2/source/controller/dialogs/tp_RangeChooser.hrc
+++ b/chart2/source/controller/dialogs/tp_RangeChooser.hrc
@@ -31,4 +31,6 @@
#define CB_FIRST_ROW_ASLABELS 1
#define CB_FIRST_COLUMN_ASLABELS 2
+#define CB_TIME_BASED 3
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.hxx b/chart2/source/controller/dialogs/tp_RangeChooser.hxx
index 5d074fc..c6f5c61 100644
--- a/chart2/source/controller/dialogs/tp_RangeChooser.hxx
+++ b/chart2/source/controller/dialogs/tp_RangeChooser.hxx
@@ -89,6 +89,8 @@ protected: //member
CheckBox m_aCB_FirstRowAsLabel;
CheckBox m_aCB_FirstColumnAsLabel;
+ CheckBox m_aCB_TimeBased;
+
sal_Int32 m_nChangingControlCalls;
bool m_bIsDirty;
diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.src b/chart2/source/controller/dialogs/tp_RangeChooser.src
index 0865c9b..d19af78 100644
--- a/chart2/source/controller/dialogs/tp_RangeChooser.src
+++ b/chart2/source/controller/dialogs/tp_RangeChooser.src
@@ -86,6 +86,12 @@ TabPage TP_RANGECHOOSER
Size = MAP_APPFONT ( 236 , 10 ) ;
Text [ en-US ] = "F~irst column as label" ;
};
+ CheckBox CB_TIME_BASED
+ {
+ Pos = MAP_APPFONT ( 6, 112 );
+ Size = MAP_APPFONT( 236, 10 );
+ Text [ en-US ] = "Use time based charting";
+ };
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list