summaryrefslogtreecommitdiff
path: root/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2008-02-18 14:44:58 +0000
committerRüdiger Timm <rt@openoffice.org>2008-02-18 14:44:58 +0000
commit77ef91305ebf7f0cf0be94a18c88010da658907e (patch)
treef8f4b3ef69cd9658f1e1a1b56eb8d40baf670a72 /chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
parente52bc41a765b8b2c4e76048549ce000082852cd8 (diff)
INTEGRATION: CWS chart19 (1.19.10); FILE MERGED
2008/01/15 19:18:28 iha 1.19.10.9: #i16776#,#i37823# don't offer pie options for single pie pieces 2008/01/15 08:19:54 bm 1.19.10.8: #i44768# some string adaptions for trendlines 2008/01/14 17:13:26 bm 1.19.10.7: #i44768# allow getting the information if OK was pressed, although nothing was changed 2008/01/14 16:19:19 bm 1.19.10.6: #i44768# tp_RegressionOptions became obsolete 2008/01/14 16:10:28 bm 1.19.10.5: #i44768# tp_RegressionOptions became obsolete 2008/01/11 15:58:42 bm 1.19.10.4: #i44768# make it easier to add and modify trendlines 2007/12/20 16:14:49 bm 1.19.10.3: #i84801# split up statistic dialog into error bar dialog and trendline dialog 2007/12/18 13:45:52 bm 1.19.10.2: RESYNC: (1.19-1.20); FILE MERGED 2007/12/15 13:04:45 iha 1.19.10.1: #i16776# starting angle for pie charts
Diffstat (limited to 'chart2/source/controller/dialogs/dlg_ObjectProperties.cxx')
-rw-r--r--chart2/source/controller/dialogs/dlg_ObjectProperties.cxx58
1 files changed, 44 insertions, 14 deletions
diff --git a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
index cb9456e67736..54c5755d468c 100644
--- a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
+++ b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: dlg_ObjectProperties.cxx,v $
*
- * $Revision: 1.20 $
+ * $Revision: 1.21 $
*
- * last change: $Author: ihi $ $Date: 2007-11-23 11:46:53 $
+ * last change: $Author: rt $ $Date: 2008-02-18 15:44:58 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -51,10 +51,11 @@
#include "tp_LegendPosition.hxx"
#include "tp_PointGeometry.hxx"
#include "tp_Scale.hxx"
-#include "tp_SeriesStatistic.hxx"
+#include "tp_ErrorBars.hxx"
+#include "tp_Trendline.hxx"
#include "tp_SeriesToAxis.hxx"
#include "tp_TitleRotation.hxx"
-#include "tp_RegressionOptions.hxx"
+#include "tp_PolarOptions.hxx"
#include "ResId.hxx"
#include "ViewElementListProvider.hxx"
#include "macros.hxx"
@@ -139,6 +140,7 @@ ObjectPropertiesDialogParameter::ObjectPropertiesDialogParameter( const rtl::OUS
, m_bHasScaleProperties(false)
, m_bCanAxisLabelsBeStaggered(false)
, m_bHasNumberProperties(false)
+ , m_bProvidesStartingAngle(false)
{
rtl::OUString aParticleID = ObjectIdentifier::getParticleID( m_aObjectCID );
m_bAffectsMultipleObjects = aParticleID.equals(C2U("ALLELEMENTS"));
@@ -177,6 +179,7 @@ void ObjectPropertiesDialogParameter::init( const uno::Reference< frame::XModel
m_bHasRegressionProperties = ChartTypeHelper::isSupportingRegressionProperties( xChartType, nDimensionCount );
m_bProvidesSecondaryYAxis = ChartTypeHelper::isSupportingSecondaryAxis( xChartType, nDimensionCount, 1 );
m_bProvidesOverlapAndGapWidth = ChartTypeHelper::isSupportingOverlapAndGapWidthProperties( xChartType, nDimensionCount );
+ m_bProvidesStartingAngle = ChartTypeHelper::isSupportingStartingAngle( xChartType );
}
}
m_bHasLineProperties = true; //@todo ask object
@@ -266,6 +269,10 @@ bool ObjectPropertiesDialogParameter::HasNumberProperties() const
{
return m_bHasNumberProperties;
}
+bool ObjectPropertiesDialogParameter::ProvidesStartingAngle() const
+{
+ return m_bProvidesStartingAngle;
+}
//const USHORT nNoArrowDlg = 1100;
const USHORT nNoArrowNoShadowDlg = 1101;
@@ -302,6 +309,7 @@ SchAttribTabDlg::SchAttribTabDlg(Window* pParent,
, m_pSymbolShapeProperties(NULL)
, m_pAutoSymbolGraphic(NULL)
, m_fAxisMinorStepWidthForErrorBarDecimals(0.1)
+ , m_bOKPressed(false)
{
FreeResource();
@@ -344,11 +352,13 @@ SchAttribTabDlg::SchAttribTabDlg(Window* pParent,
AddTabPage(RID_SVXPAGE_CHAR_EFFECTS, String(SchResId(STR_PAGE_FONT_EFFECTS)));
AddTabPage(TP_DATA_DESCR, String(SchResId(STR_OBJECT_DATALABELS)), DataLabelsTabPage::Create, NULL);
if( m_pParameter->HasStatisticProperties() )
- AddTabPage(TP_STAT, String(SchResId(STR_PAGE_STATISTICS)), SchStatisticTabPage::Create, NULL);
+ AddTabPage(TP_YERRORBAR, String(SchResId(STR_PAGE_YERROR_BARS)), ErrorBarsTabPage::Create, NULL);
if( m_pParameter->HasGeometryProperties() )
AddTabPage(TP_LAYOUT, String(SchResId(STR_PAGE_LAYOUT)),SchLayoutTabPage::Create, NULL);
if( m_pParameter->ProvidesSecondaryYAxis() || m_pParameter->ProvidesOverlapAndGapWidth() )
AddTabPage(TP_OPTIONS, String(SchResId(STR_PAGE_OPTIONS)),SchOptionTabPage::Create, NULL);
+ if( m_pParameter->ProvidesStartingAngle())
+ AddTabPage(TP_POLAROPTIONS, String(SchResId(STR_PAGE_OPTIONS)),PolarOptionsTabPage::Create, NULL);
break;
case OBJECTTYPE_AXIS:
@@ -376,8 +386,9 @@ SchAttribTabDlg::SchAttribTabDlg(Window* pParent,
break;
case OBJECTTYPE_DATA_CURVE:
+ OSL_ASSERT( m_pParameter->HasRegressionProperties());
+ AddTabPage(TP_TRENDLINE, String(SchResId(STR_PAGE_TRENDLINE_TYPE)), TrendlineTabPage::Create, NULL);
AddTabPage(RID_SVXPAGE_LINE, String(SchResId(STR_PAGE_LINE)));
- AddTabPage(TP_REGRESSION_OPTIONS, String(SchResId(STR_PAGE_REGRESSION_OPTIONS)), RegressionOptionsTabPage::Create, NULL);
break;
case OBJECTTYPE_DATA_STOCK_LOSS:
@@ -405,6 +416,12 @@ SchAttribTabDlg::SchAttribTabDlg(Window* pParent,
AddTabPage(RID_SVXPAGE_NUMBERFORMAT, String(SchResId(STR_PAGE_NUMBERS)));
break;
}
+
+ // used to find out if user left the dialog with OK. When OK is pressed but
+ // no changes were done, Cancel is returned by the SfxTabDialog. See method
+ // DialogWasClosedWithOK.
+ m_aOriginalOKClickHdl = GetOKButton().GetClickHdl();
+ GetOKButton().SetClickHdl( LINK( this, SchAttribTabDlg, OKPressed ));
}
SchAttribTabDlg::~SchAttribTabDlg()
@@ -510,18 +527,31 @@ void SchAttribTabDlg::PageCreated(USHORT nId, SfxTabPage &rPage)
rPage.PageCreated(aSet);
break;
- case TP_STAT:
- static_cast< SchStatisticTabPage & >( rPage ).EnableTrendLine(
- m_pParameter->HasRegressionProperties() );
- static_cast< SchStatisticTabPage & >( rPage ).SetAxisMinorStepWidthForErrorBarDecimals(
- m_fAxisMinorStepWidthForErrorBarDecimals );
- break;
-
- case TP_REGRESSION_OPTIONS:
+ case TP_YERRORBAR:
+ {
+ ErrorBarsTabPage * pTabPage = dynamic_cast< ErrorBarsTabPage * >( &rPage );
+ OSL_ASSERT( pTabPage );
+ if( pTabPage )
+ {
+ pTabPage->SetAxisMinorStepWidthForErrorBarDecimals( m_fAxisMinorStepWidthForErrorBarDecimals );
+ pTabPage->SetErrorBarType( ErrorBarResources::ERROR_BAR_Y );
+ }
break;
+ }
}
}
+IMPL_LINK( SchAttribTabDlg, OKPressed, void * , EMPTYARG )
+{
+ m_bOKPressed = true;
+ return m_aOriginalOKClickHdl.Call( this );
+}
+
+bool SchAttribTabDlg::DialogWasClosedWithOK() const
+{
+ return m_bOKPressed;
+}
+
//.............................................................................
} //namespace chart
//.............................................................................