summaryrefslogtreecommitdiff
path: root/chart2/source/controller/dialogs/DialogModel.cxx
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-01-04 11:16:06 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-01-29 08:09:34 +0100
commit9c5593bebf4b573cfb7795ed857c6dceb4a26e73 (patch)
treebb50ec6bfb7bbda0c77fdb582bb73970782953df /chart2/source/controller/dialogs/DialogModel.cxx
parentd3959bba7165e6a8d53195eccfcaaa652edc24ea (diff)
start time based onlz after dialog is closed
everything else seems to result in serious bugs!! Change-Id: I1afbdb7623f877781c7ef362d87608a1e2aba72e
Diffstat (limited to 'chart2/source/controller/dialogs/DialogModel.cxx')
-rw-r--r--chart2/source/controller/dialogs/DialogModel.cxx20
1 files changed, 17 insertions, 3 deletions
diff --git a/chart2/source/controller/dialogs/DialogModel.cxx b/chart2/source/controller/dialogs/DialogModel.cxx
index 0285548da4f3..c7903f06e4b2 100644
--- a/chart2/source/controller/dialogs/DialogModel.cxx
+++ b/chart2/source/controller/dialogs/DialogModel.cxx
@@ -367,6 +367,13 @@ struct lcl_addSeriesNumber : public ::std::binary_function<
namespace chart
{
+TimeBasedInfo::TimeBasedInfo():
+ bTimeBased(false),
+ nStart(0),
+ nEnd(0)
+{
+}
+
DialogModel::DialogModel(
const Reference< XChartDocument > & xChartDocument,
const Reference< uno::XComponentContext > & xContext ) :
@@ -377,7 +384,12 @@ DialogModel::DialogModel(
}
DialogModel::~DialogModel()
-{}
+{
+ if(maTimeBasedInfo.bTimeBased)
+ {
+ getModel().setTimeBasedRange(maTimeBasedInfo.nStart, maTimeBasedInfo.nEnd);
+ }
+}
void DialogModel::setTemplate(
const Reference< XChartTypeTemplate > & xTemplate )
@@ -716,9 +728,11 @@ bool DialogModel::setData(
return true;
}
-void DialogModel::setTimeBasedRange(sal_Int32 nStart, sal_Int32 nEnd) const
+void DialogModel::setTimeBasedRange( bool bTimeBased, sal_Int32 nStart, sal_Int32 nEnd) const
{
- getModel().setTimeBasedRange(nStart, nEnd);
+ maTimeBasedInfo.nStart = nStart;
+ maTimeBasedInfo.nEnd = nEnd;
+ maTimeBasedInfo.bTimeBased = bTimeBased;
}
OUString DialogModel::ConvertRoleFromInternalToUI( const OUString & rRoleString )