summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2009-08-26 12:47:18 +0000
committerVladimir Glazounov <vg@openoffice.org>2009-08-26 12:47:18 +0000
commitc1b45151c3c75e2cce692e78d815e33187ccd95f (patch)
tree5b8dddcf23de94b7ff1d3c272f5ed7ec86f79327 /chart2
parentd83d12839460b1cd0f5e9d495be3724f336f21a5 (diff)
CWS-TOOLING: integrate CWS chart40
2009-08-05 10:28:53 +0200 iha r274640 : CWS-TOOLING: rebase CWS chart40 to trunk@274622 (milestone: DEV300:m54) 2009-07-31 18:03:11 +0200 iha r274546 : #i91420# number of lines on chart type dialog is incorrect 2009-07-23 15:51:13 +0200 iha r274275 : correct detection of old chart files b6700820 2009-07-23 15:10:30 +0200 iha r274273 : #i103287# some lines vanish on import of some old files (opacity-problem) 2009-07-23 13:42:10 +0200 iha r274268 : #i103588# Chart in report cause crash 2009-07-23 10:57:14 +0200 iha r274264 : #i95503# Enter key does not work in source ranges dialog 2009-07-22 10:25:02 +0200 iha r274221 : #i103713# ambiguous && || 2009-07-20 12:59:02 +0200 iha r274120 : #i103468# remove warning
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/dialogs/dlg_DataSource.cxx13
-rw-r--r--chart2/source/controller/dialogs/tp_ChartType.cxx3
-rw-r--r--chart2/source/controller/dialogs/tp_DataSource.cxx23
-rw-r--r--chart2/source/controller/dialogs/tp_DataSource.hxx7
-rw-r--r--chart2/source/controller/dialogs/tp_RangeChooser.cxx23
-rw-r--r--chart2/source/controller/dialogs/tp_RangeChooser.hxx6
-rw-r--r--chart2/source/controller/inc/dlg_DataSource.hxx3
-rw-r--r--chart2/source/view/charttypes/BubbleChart.cxx4
-rw-r--r--chart2/source/view/main/VDataSeries.cxx2
9 files changed, 80 insertions, 4 deletions
diff --git a/chart2/source/controller/dialogs/dlg_DataSource.cxx b/chart2/source/controller/dialogs/dlg_DataSource.cxx
index 1d76a106d72b..1aa7db1f0f17 100644
--- a/chart2/source/controller/dialogs/dlg_DataSource.cxx
+++ b/chart2/source/controller/dialogs/dlg_DataSource.cxx
@@ -202,6 +202,19 @@ DataSourceDialog::~DataSourceDialog()
delete m_pTabControl;
}
+short DataSourceDialog::Execute()
+{
+ short nResult = TabDialog::Execute();
+ if( nResult == RET_OK )
+ {
+ if( m_pRangeChooserTabePage )
+ m_pRangeChooserTabePage->commitPage();
+ if( m_pDataSourceTabPage )
+ m_pDataSourceTabPage->commitPage();
+ }
+ return nResult;
+}
+
void DataSourceDialog::setInvalidPage( TabPage * pTabPage )
{
if( pTabPage == m_pRangeChooserTabePage )
diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx
index b2d64400ef98..c35f11546d36 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.cxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.cxx
@@ -995,7 +995,8 @@ IMPL_LINK( ChartTypeTabPage, SelectMainTypeHdl, void *, EMPTYARG )
aParameter.bSortByXValues = lcl_getSortByXValues( m_xChartModel );
this->fillAllControls( aParameter );
- m_pCurrentMainType->fillExtraControls(aParameter,m_xChartModel);
+ uno::Reference< beans::XPropertySet > xTemplateProps( this->getCurrentTemplate(), uno::UNO_QUERY );
+ m_pCurrentMainType->fillExtraControls(aParameter,m_xChartModel,xTemplateProps);
}
return 0;
}
diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx
index f499e2acc23a..ff858c5bfdf5 100644
--- a/chart2/source/controller/dialogs/tp_DataSource.cxx
+++ b/chart2/source/controller/dialogs/tp_DataSource.cxx
@@ -377,6 +377,29 @@ void DataSourceTabPage::initializePage()
{
}
+void DataSourceTabPage::DeactivatePage()
+{
+ commitPage();
+ svt::OWizardPage::DeactivatePage();
+}
+
+void DataSourceTabPage::commitPage()
+{
+ commitPage(eFinish);
+}
+
+sal_Bool DataSourceTabPage::commitPage( CommitPageReason /*eReason*/ )
+{
+ //ranges may have been edited in the meanwhile (dirty is true in that case here)
+ if( isValid() )
+ {
+ updateModelFromControl( 0 /*update all*/ );
+ return sal_True;//return false if this page should not be left
+ }
+ else
+ return sal_False;
+}
+
bool DataSourceTabPage::isRangeFieldContentValid( Edit & rEdit )
{
OUString aRange( rEdit.GetText());
diff --git a/chart2/source/controller/dialogs/tp_DataSource.hxx b/chart2/source/controller/dialogs/tp_DataSource.hxx
index 2703836d5d1d..6c42f1cb98e2 100644
--- a/chart2/source/controller/dialogs/tp_DataSource.hxx
+++ b/chart2/source/controller/dialogs/tp_DataSource.hxx
@@ -87,8 +87,15 @@ public:
bool bHideDescription = false );
virtual ~DataSourceTabPage();
+ void commitPage();
+
+protected:
// OWizardPage
virtual void ActivatePage();
+ virtual sal_Bool commitPage( CommitPageReason eReason );
+
+ //TabPage
+ virtual void DeactivatePage();
virtual void initializePage();
diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.cxx b/chart2/source/controller/dialogs/tp_RangeChooser.cxx
index 2c2bc3fc6892..8ba4d61a8057 100644
--- a/chart2/source/controller/dialogs/tp_RangeChooser.cxx
+++ b/chart2/source/controller/dialogs/tp_RangeChooser.cxx
@@ -216,6 +216,29 @@ void RangeChooserTabPage::initControlsFromModel()
m_nChangingControlCalls--;
}
+void RangeChooserTabPage::DeactivatePage()
+{
+ commitPage();
+ svt::OWizardPage::DeactivatePage();
+}
+
+void RangeChooserTabPage::commitPage()
+{
+ commitPage(eFinish);
+}
+
+sal_Bool RangeChooserTabPage::commitPage( CommitPageReason /*eReason*/ )
+{
+ //ranges may have been edited in the meanwhile (dirty is true in that case here)
+ if( isValid() )
+ {
+ changeDialogModelAccordingToControls();
+ return sal_True;//return false if this page should not be left
+ }
+ else
+ return sal_False;
+}
+
void RangeChooserTabPage::changeDialogModelAccordingToControls()
{
if(m_nChangingControlCalls>0)
diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.hxx b/chart2/source/controller/dialogs/tp_RangeChooser.hxx
index 01062ba4c0f1..bb508da8d9a1 100644
--- a/chart2/source/controller/dialogs/tp_RangeChooser.hxx
+++ b/chart2/source/controller/dialogs/tp_RangeChooser.hxx
@@ -70,10 +70,16 @@ virtual ~RangeChooserTabPage();
virtual void listeningFinished( const ::rtl::OUString & rNewRange );
virtual void disposingRangeSelection();
+ void commitPage();
+
protected: //methods
//OWizardPage
virtual void ActivatePage();
+ virtual sal_Bool commitPage( CommitPageReason eReason );
+
+ //TabPage
+ virtual void DeactivatePage();
void initControlsFromModel();
void changeDialogModelAccordingToControls();
diff --git a/chart2/source/controller/inc/dlg_DataSource.hxx b/chart2/source/controller/inc/dlg_DataSource.hxx
index cfbe7aa561e8..331136607e75 100644
--- a/chart2/source/controller/inc/dlg_DataSource.hxx
+++ b/chart2/source/controller/inc/dlg_DataSource.hxx
@@ -68,6 +68,9 @@ public:
::com::sun::star::uno::XComponentContext > & xContext );
virtual ~DataSourceDialog();
+ // from Dialog (base of TabDialog)
+ virtual short Execute();
+
// TabPageNotifiable
virtual void setInvalidPage( TabPage * pTabPage );
virtual void setValidPage( TabPage * pTabPage );
diff --git a/chart2/source/view/charttypes/BubbleChart.cxx b/chart2/source/view/charttypes/BubbleChart.cxx
index b63603ef403a..6069189ff0ac 100644
--- a/chart2/source/view/charttypes/BubbleChart.cxx
+++ b/chart2/source/view/charttypes/BubbleChart.cxx
@@ -111,7 +111,7 @@ void BubbleChart::calculateMaximumLogicBubbleSize()
double fSize = pSeries->getBubble_Size( nIndex );
if( m_bShowNegativeValues )
- fSize = abs(fSize);
+ fSize = fabs(fSize);
if( fSize > fMaxSize )
fMaxSize = fSize;
}
@@ -146,7 +146,7 @@ drawing::Direction3D BubbleChart::transformToScreenBubbleSize( double fLogicSize
return aRet;
if( m_bShowNegativeValues )
- fLogicSize = abs(fLogicSize);
+ fLogicSize = fabs(fLogicSize);
double fMaxSize = m_fMaxLogicBubbleSize;
diff --git a/chart2/source/view/main/VDataSeries.cxx b/chart2/source/view/main/VDataSeries.cxx
index d2456110b79b..abe8fad1a942 100644
--- a/chart2/source/view/main/VDataSeries.cxx
+++ b/chart2/source/view/main/VDataSeries.cxx
@@ -151,7 +151,7 @@ void lcl_clearIfNoValuesButTextIsContained( VDataSequence& rData, const uno::Ref
void lcl_maybeReplaceNanWithZero( double& rfValue, sal_Int32 nMissingValueTreatment )
{
if( nMissingValueTreatment == ::com::sun::star::chart::MissingValueTreatment::USE_ZERO
- && ::rtl::math::isNan(rfValue) || ::rtl::math::isInf(rfValue) )
+ && (::rtl::math::isNan(rfValue) || ::rtl::math::isInf(rfValue)) )
rfValue = 0.0;
}