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
This commit is contained in:
Vladimir Glazounov
2009-08-26 12:47:18 +00:00
parent d83d128394
commit c1b45151c3
9 changed files with 80 additions and 4 deletions

View File

@@ -202,6 +202,19 @@ DataSourceDialog::~DataSourceDialog()
delete m_pTabControl; 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 ) void DataSourceDialog::setInvalidPage( TabPage * pTabPage )
{ {
if( pTabPage == m_pRangeChooserTabePage ) if( pTabPage == m_pRangeChooserTabePage )

View File

@@ -995,7 +995,8 @@ IMPL_LINK( ChartTypeTabPage, SelectMainTypeHdl, void *, EMPTYARG )
aParameter.bSortByXValues = lcl_getSortByXValues( m_xChartModel ); aParameter.bSortByXValues = lcl_getSortByXValues( m_xChartModel );
this->fillAllControls( aParameter ); 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; return 0;
} }

View File

@@ -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 ) bool DataSourceTabPage::isRangeFieldContentValid( Edit & rEdit )
{ {
OUString aRange( rEdit.GetText()); OUString aRange( rEdit.GetText());

View File

@@ -87,8 +87,15 @@ public:
bool bHideDescription = false ); bool bHideDescription = false );
virtual ~DataSourceTabPage(); virtual ~DataSourceTabPage();
void commitPage();
protected:
// OWizardPage // OWizardPage
virtual void ActivatePage(); virtual void ActivatePage();
virtual sal_Bool commitPage( CommitPageReason eReason );
//TabPage
virtual void DeactivatePage();
virtual void initializePage(); virtual void initializePage();

View File

@@ -216,6 +216,29 @@ void RangeChooserTabPage::initControlsFromModel()
m_nChangingControlCalls--; 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() void RangeChooserTabPage::changeDialogModelAccordingToControls()
{ {
if(m_nChangingControlCalls>0) if(m_nChangingControlCalls>0)

View File

@@ -70,10 +70,16 @@ virtual ~RangeChooserTabPage();
virtual void listeningFinished( const ::rtl::OUString & rNewRange ); virtual void listeningFinished( const ::rtl::OUString & rNewRange );
virtual void disposingRangeSelection(); virtual void disposingRangeSelection();
void commitPage();
protected: //methods protected: //methods
//OWizardPage //OWizardPage
virtual void ActivatePage(); virtual void ActivatePage();
virtual sal_Bool commitPage( CommitPageReason eReason );
//TabPage
virtual void DeactivatePage();
void initControlsFromModel(); void initControlsFromModel();
void changeDialogModelAccordingToControls(); void changeDialogModelAccordingToControls();

View File

@@ -68,6 +68,9 @@ public:
::com::sun::star::uno::XComponentContext > & xContext ); ::com::sun::star::uno::XComponentContext > & xContext );
virtual ~DataSourceDialog(); virtual ~DataSourceDialog();
// from Dialog (base of TabDialog)
virtual short Execute();
// TabPageNotifiable // TabPageNotifiable
virtual void setInvalidPage( TabPage * pTabPage ); virtual void setInvalidPage( TabPage * pTabPage );
virtual void setValidPage( TabPage * pTabPage ); virtual void setValidPage( TabPage * pTabPage );

View File

@@ -111,7 +111,7 @@ void BubbleChart::calculateMaximumLogicBubbleSize()
double fSize = pSeries->getBubble_Size( nIndex ); double fSize = pSeries->getBubble_Size( nIndex );
if( m_bShowNegativeValues ) if( m_bShowNegativeValues )
fSize = abs(fSize); fSize = fabs(fSize);
if( fSize > fMaxSize ) if( fSize > fMaxSize )
fMaxSize = fSize; fMaxSize = fSize;
} }
@@ -146,7 +146,7 @@ drawing::Direction3D BubbleChart::transformToScreenBubbleSize( double fLogicSize
return aRet; return aRet;
if( m_bShowNegativeValues ) if( m_bShowNegativeValues )
fLogicSize = abs(fLogicSize); fLogicSize = fabs(fLogicSize);
double fMaxSize = m_fMaxLogicBubbleSize; double fMaxSize = m_fMaxLogicBubbleSize;

View File

@@ -151,7 +151,7 @@ void lcl_clearIfNoValuesButTextIsContained( VDataSequence& rData, const uno::Ref
void lcl_maybeReplaceNanWithZero( double& rfValue, sal_Int32 nMissingValueTreatment ) void lcl_maybeReplaceNanWithZero( double& rfValue, sal_Int32 nMissingValueTreatment )
{ {
if( nMissingValueTreatment == ::com::sun::star::chart::MissingValueTreatment::USE_ZERO 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; rfValue = 0.0;
} }