summaryrefslogtreecommitdiff
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
commit23f6a9d5f7ca9af7bf01492e962daa2e2381fdda (patch)
treebdde24a566f2eb0b9bedf30967a7bcc74e86af10
parentd888c1b0809eb3857b0cb7b9574bf4f455482be5 (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
-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 fe2165c07..dc18673d1 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 0acd696dc..4af112eb7 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 7466acdd5..b1703e491 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 5e9070723..1fe223a2c 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 66329e692..306114923 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 1c3162828..4ede2c67d 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 393588e31..a0492f2c4 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 730828ab9..0189689b7 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 0628f09e9..8f7f0a5e8 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;
}