1*cde9e8dcSAndrew Rist /**************************************************************
2cdf0e10cSrcweir *
3*cde9e8dcSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4*cde9e8dcSAndrew Rist * or more contributor license agreements. See the NOTICE file
5*cde9e8dcSAndrew Rist * distributed with this work for additional information
6*cde9e8dcSAndrew Rist * regarding copyright ownership. The ASF licenses this file
7*cde9e8dcSAndrew Rist * to you under the Apache License, Version 2.0 (the
8*cde9e8dcSAndrew Rist * "License"); you may not use this file except in compliance
9*cde9e8dcSAndrew Rist * with the License. You may obtain a copy of the License at
10*cde9e8dcSAndrew Rist *
11*cde9e8dcSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0
12*cde9e8dcSAndrew Rist *
13*cde9e8dcSAndrew Rist * Unless required by applicable law or agreed to in writing,
14*cde9e8dcSAndrew Rist * software distributed under the License is distributed on an
15*cde9e8dcSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*cde9e8dcSAndrew Rist * KIND, either express or implied. See the License for the
17*cde9e8dcSAndrew Rist * specific language governing permissions and limitations
18*cde9e8dcSAndrew Rist * under the License.
19*cde9e8dcSAndrew Rist *
20*cde9e8dcSAndrew Rist *************************************************************/
21*cde9e8dcSAndrew Rist
22*cde9e8dcSAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_chart2.hxx"
26cdf0e10cSrcweir #ifndef _ZFORLIST_HXX
27cdf0e10cSrcweir #ifndef _ZFORLIST_DECLARE_TABLE
28cdf0e10cSrcweir #define _ZFORLIST_DECLARE_TABLE
29cdf0e10cSrcweir #endif
30cdf0e10cSrcweir #include <svl/zforlist.hxx>
31cdf0e10cSrcweir #endif
32cdf0e10cSrcweir
33cdf0e10cSrcweir #include "dlg_ObjectProperties.hxx"
34cdf0e10cSrcweir #include "ResourceIds.hrc"
35cdf0e10cSrcweir #include "Strings.hrc"
36cdf0e10cSrcweir #include "TabPages.hrc"
37cdf0e10cSrcweir #include "tp_AxisLabel.hxx"
38cdf0e10cSrcweir #include "tp_DataLabel.hxx"
39cdf0e10cSrcweir #include "tp_LegendPosition.hxx"
40cdf0e10cSrcweir #include "tp_PointGeometry.hxx"
41cdf0e10cSrcweir #include "tp_Scale.hxx"
42cdf0e10cSrcweir #include "tp_AxisPositions.hxx"
43cdf0e10cSrcweir #include "tp_ErrorBars.hxx"
44cdf0e10cSrcweir #include "tp_Trendline.hxx"
45cdf0e10cSrcweir #include "tp_SeriesToAxis.hxx"
46cdf0e10cSrcweir #include "tp_TitleRotation.hxx"
47cdf0e10cSrcweir #include "tp_PolarOptions.hxx"
48cdf0e10cSrcweir #include "ResId.hxx"
49cdf0e10cSrcweir #include "ViewElementListProvider.hxx"
50cdf0e10cSrcweir #include "macros.hxx"
51cdf0e10cSrcweir #include "ChartModelHelper.hxx"
52cdf0e10cSrcweir #include "ChartTypeHelper.hxx"
53cdf0e10cSrcweir #include "ObjectNameProvider.hxx"
54cdf0e10cSrcweir #include "DiagramHelper.hxx"
55cdf0e10cSrcweir #include "NumberFormatterWrapper.hxx"
56cdf0e10cSrcweir #include "AxisIndexDefines.hxx"
57cdf0e10cSrcweir #include "AxisHelper.hxx"
58cdf0e10cSrcweir #include "ExplicitCategoriesProvider.hxx"
59cdf0e10cSrcweir
60cdf0e10cSrcweir #include <com/sun/star/chart2/XAxis.hpp>
61cdf0e10cSrcweir #include <com/sun/star/chart2/XChartType.hpp>
62cdf0e10cSrcweir #include <com/sun/star/chart2/XDataSeries.hpp>
63cdf0e10cSrcweir #include <svl/intitem.hxx>
64cdf0e10cSrcweir #include <svl/languageoptions.hxx>
65cdf0e10cSrcweir
66cdf0e10cSrcweir #include <svx/svxids.hrc>
67cdf0e10cSrcweir
68cdf0e10cSrcweir #include <svx/drawitem.hxx>
69cdf0e10cSrcweir #include <svx/ofaitem.hxx>
70cdf0e10cSrcweir #include <svx/svxgrahicitem.hxx>
71cdf0e10cSrcweir
72cdf0e10cSrcweir #include <svx/dialogs.hrc>
73cdf0e10cSrcweir #include <editeng/flstitem.hxx>
74cdf0e10cSrcweir #include <svx/tabline.hxx>
75cdf0e10cSrcweir
76cdf0e10cSrcweir #include <svx/flagsdef.hxx>
77cdf0e10cSrcweir #include <svx/numinf.hxx>
78cdf0e10cSrcweir
79cdf0e10cSrcweir #include <svl/cjkoptions.hxx>
80cdf0e10cSrcweir
81cdf0e10cSrcweir //.............................................................................
82cdf0e10cSrcweir namespace chart
83cdf0e10cSrcweir {
84cdf0e10cSrcweir //.............................................................................
85cdf0e10cSrcweir
86cdf0e10cSrcweir using namespace ::com::sun::star;
87cdf0e10cSrcweir using namespace ::com::sun::star::chart2;
88cdf0e10cSrcweir using ::com::sun::star::uno::Reference;
89cdf0e10cSrcweir
90cdf0e10cSrcweir //-----------------------------------------------------------------------------
91cdf0e10cSrcweir //-----------------------------------------------------------------------------
92cdf0e10cSrcweir //-----------------------------------------------------------------------------
93cdf0e10cSrcweir
ObjectPropertiesDialogParameter(const rtl::OUString & rObjectCID)94cdf0e10cSrcweir ObjectPropertiesDialogParameter::ObjectPropertiesDialogParameter( const rtl::OUString& rObjectCID )
95cdf0e10cSrcweir : m_aObjectCID( rObjectCID )
96cdf0e10cSrcweir , m_eObjectType( ObjectIdentifier::getObjectType( m_aObjectCID ) )
97cdf0e10cSrcweir , m_bAffectsMultipleObjects(false)
98cdf0e10cSrcweir , m_aLocalizedName()
99cdf0e10cSrcweir , m_bHasGeometryProperties(false)
100cdf0e10cSrcweir , m_bHasStatisticProperties(false)
101cdf0e10cSrcweir , m_bProvidesSecondaryYAxis(false)
102cdf0e10cSrcweir , m_bProvidesOverlapAndGapWidth(false)
103cdf0e10cSrcweir , m_bProvidesBarConnectors(false)
104cdf0e10cSrcweir , m_bHasAreaProperties(false)
105cdf0e10cSrcweir , m_bHasSymbolProperties(false)
106cdf0e10cSrcweir , m_bHasNumberProperties(false)
107cdf0e10cSrcweir , m_bProvidesStartingAngle(false)
108cdf0e10cSrcweir , m_bProvidesMissingValueTreatments(false)
109cdf0e10cSrcweir , m_bHasScaleProperties(false)
110cdf0e10cSrcweir , m_bCanAxisLabelsBeStaggered(false)
111cdf0e10cSrcweir , m_bSupportingAxisPositioning(false)
112cdf0e10cSrcweir , m_bShowAxisOrigin(false)
113cdf0e10cSrcweir , m_bIsCrossingAxisIsCategoryAxis(false)
114cdf0e10cSrcweir , m_aCategories()
115cdf0e10cSrcweir , m_xChartDocument( 0 )
116cdf0e10cSrcweir , m_bComplexCategoriesAxis( false )
117cdf0e10cSrcweir {
118cdf0e10cSrcweir rtl::OUString aParticleID = ObjectIdentifier::getParticleID( m_aObjectCID );
119cdf0e10cSrcweir m_bAffectsMultipleObjects = aParticleID.equals(C2U("ALLELEMENTS"));
120cdf0e10cSrcweir }
~ObjectPropertiesDialogParameter()121cdf0e10cSrcweir ObjectPropertiesDialogParameter::~ObjectPropertiesDialogParameter()
122cdf0e10cSrcweir {
123cdf0e10cSrcweir }
getObjectType() const124cdf0e10cSrcweir ObjectType ObjectPropertiesDialogParameter::getObjectType() const
125cdf0e10cSrcweir {
126cdf0e10cSrcweir return m_eObjectType;
127cdf0e10cSrcweir }
getLocalizedName() const128cdf0e10cSrcweir rtl::OUString ObjectPropertiesDialogParameter::getLocalizedName() const
129cdf0e10cSrcweir {
130cdf0e10cSrcweir return m_aLocalizedName;
131cdf0e10cSrcweir }
132cdf0e10cSrcweir
init(const uno::Reference<frame::XModel> & xChartModel)133cdf0e10cSrcweir void ObjectPropertiesDialogParameter::init( const uno::Reference< frame::XModel >& xChartModel )
134cdf0e10cSrcweir {
135cdf0e10cSrcweir m_xChartDocument.set( xChartModel, uno::UNO_QUERY );
136cdf0e10cSrcweir uno::Reference< XDiagram > xDiagram( ChartModelHelper::findDiagram( xChartModel ) );
137cdf0e10cSrcweir uno::Reference< XDataSeries > xSeries = ObjectIdentifier::getDataSeriesForCID( m_aObjectCID, xChartModel );
138cdf0e10cSrcweir uno::Reference< XChartType > xChartType = ChartModelHelper::getChartTypeOfSeries( xChartModel, xSeries );
139cdf0e10cSrcweir sal_Int32 nDimensionCount = DiagramHelper::getDimension( xDiagram );
140cdf0e10cSrcweir
141cdf0e10cSrcweir bool bHasSeriesProperties = (OBJECTTYPE_DATA_SERIES==m_eObjectType);
142cdf0e10cSrcweir bool bHasDataPointproperties = (OBJECTTYPE_DATA_POINT==m_eObjectType);
143cdf0e10cSrcweir
144cdf0e10cSrcweir if( bHasSeriesProperties || bHasDataPointproperties )
145cdf0e10cSrcweir {
146cdf0e10cSrcweir m_bHasGeometryProperties = ChartTypeHelper::isSupportingGeometryProperties( xChartType, nDimensionCount );
147cdf0e10cSrcweir m_bHasAreaProperties = ChartTypeHelper::isSupportingAreaProperties( xChartType, nDimensionCount );
148cdf0e10cSrcweir m_bHasSymbolProperties = ChartTypeHelper::isSupportingSymbolProperties( xChartType, nDimensionCount );
149cdf0e10cSrcweir
150cdf0e10cSrcweir if( bHasSeriesProperties )
151cdf0e10cSrcweir {
152cdf0e10cSrcweir m_bHasStatisticProperties = ChartTypeHelper::isSupportingStatisticProperties( xChartType, nDimensionCount );
153cdf0e10cSrcweir m_bProvidesSecondaryYAxis = ChartTypeHelper::isSupportingSecondaryAxis( xChartType, nDimensionCount, 1 );
154cdf0e10cSrcweir m_bProvidesOverlapAndGapWidth = ChartTypeHelper::isSupportingOverlapAndGapWidthProperties( xChartType, nDimensionCount );
155cdf0e10cSrcweir m_bProvidesBarConnectors = ChartTypeHelper::isSupportingBarConnectors( xChartType, nDimensionCount );
156cdf0e10cSrcweir m_bProvidesStartingAngle = ChartTypeHelper::isSupportingStartingAngle( xChartType );
157cdf0e10cSrcweir
158cdf0e10cSrcweir m_bProvidesMissingValueTreatments = ChartTypeHelper::getSupportedMissingValueTreatments( xChartType )
159cdf0e10cSrcweir .getLength() ? true : false;
160cdf0e10cSrcweir }
161cdf0e10cSrcweir }
162cdf0e10cSrcweir
163cdf0e10cSrcweir if( OBJECTTYPE_DATA_ERRORS == m_eObjectType )
164cdf0e10cSrcweir m_bHasStatisticProperties = true;
165cdf0e10cSrcweir
166cdf0e10cSrcweir if( OBJECTTYPE_AXIS == m_eObjectType )
167cdf0e10cSrcweir {
168cdf0e10cSrcweir //show scale properties only for a single axis not for multiselection
169cdf0e10cSrcweir m_bHasScaleProperties = !m_bAffectsMultipleObjects;
170cdf0e10cSrcweir
171cdf0e10cSrcweir if( m_bHasScaleProperties )
172cdf0e10cSrcweir {
173cdf0e10cSrcweir uno::Reference< XAxis > xAxis( ObjectIdentifier::getAxisForCID( m_aObjectCID, xChartModel ) );
174cdf0e10cSrcweir if( xAxis.is() )
175cdf0e10cSrcweir {
176cdf0e10cSrcweir //no scale page for series axis
177cdf0e10cSrcweir ScaleData aData( xAxis->getScaleData() );
178cdf0e10cSrcweir if( chart2::AxisType::SERIES == aData.AxisType )
179cdf0e10cSrcweir m_bHasScaleProperties = false;
180cdf0e10cSrcweir if( chart2::AxisType::SERIES != aData.AxisType )
181cdf0e10cSrcweir m_bHasNumberProperties = true;
182cdf0e10cSrcweir
183cdf0e10cSrcweir sal_Int32 nCooSysIndex=0;
184cdf0e10cSrcweir sal_Int32 nDimensionIndex=0;
185cdf0e10cSrcweir sal_Int32 nAxisIndex=0;
186cdf0e10cSrcweir if( AxisHelper::getIndicesForAxis( xAxis, xDiagram, nCooSysIndex, nDimensionIndex, nAxisIndex ) )
187cdf0e10cSrcweir {
188cdf0e10cSrcweir xChartType = AxisHelper::getFirstChartTypeWithSeriesAttachedToAxisIndex( xDiagram, nAxisIndex );
189cdf0e10cSrcweir //show positioning controls only if they make sense
190cdf0e10cSrcweir m_bSupportingAxisPositioning = ChartTypeHelper::isSupportingAxisPositioning( xChartType, nDimensionCount, nDimensionIndex );
191cdf0e10cSrcweir
192cdf0e10cSrcweir //show axis origin only for secondary y axis
193cdf0e10cSrcweir if( 1==nDimensionIndex && 1==nAxisIndex && ChartTypeHelper::isSupportingBaseValue( xChartType ) )
194cdf0e10cSrcweir m_bShowAxisOrigin = true;
195cdf0e10cSrcweir }
196cdf0e10cSrcweir
197cdf0e10cSrcweir //is the crossin main axis a category axes?:
198cdf0e10cSrcweir uno::Reference< XCoordinateSystem > xCooSys( AxisHelper::getCoordinateSystemOfAxis( xAxis, xDiagram ) );
199cdf0e10cSrcweir uno::Reference< XAxis > xCrossingMainAxis( AxisHelper::getCrossingMainAxis( xAxis, xCooSys ) );
200cdf0e10cSrcweir if( xCrossingMainAxis.is() )
201cdf0e10cSrcweir {
202cdf0e10cSrcweir ScaleData aScale( xCrossingMainAxis->getScaleData() );
203cdf0e10cSrcweir m_bIsCrossingAxisIsCategoryAxis = ( chart2::AxisType::CATEGORY == aScale.AxisType );
204cdf0e10cSrcweir if( m_bIsCrossingAxisIsCategoryAxis )
205cdf0e10cSrcweir m_aCategories = DiagramHelper::getExplicitSimpleCategories( Reference< chart2::XChartDocument >( xChartModel, uno::UNO_QUERY) );
206cdf0e10cSrcweir }
207cdf0e10cSrcweir
208cdf0e10cSrcweir m_bComplexCategoriesAxis = false;
209cdf0e10cSrcweir if ( nDimensionIndex == 0 && aData.AxisType == chart2::AxisType::CATEGORY )
210cdf0e10cSrcweir {
211cdf0e10cSrcweir ExplicitCategoriesProvider aExplicitCategoriesProvider( xCooSys, xChartModel );
212cdf0e10cSrcweir m_bComplexCategoriesAxis = aExplicitCategoriesProvider.hasComplexCategories();
213cdf0e10cSrcweir }
214cdf0e10cSrcweir }
215cdf0e10cSrcweir }
216cdf0e10cSrcweir
217cdf0e10cSrcweir //no staggering of labels for 3D axis
218cdf0e10cSrcweir m_bCanAxisLabelsBeStaggered = nDimensionCount==2;
219cdf0e10cSrcweir }
220cdf0e10cSrcweir
221cdf0e10cSrcweir //create gui name for this object
222cdf0e10cSrcweir {
223cdf0e10cSrcweir if( !m_bAffectsMultipleObjects && OBJECTTYPE_AXIS == m_eObjectType )
224cdf0e10cSrcweir {
225cdf0e10cSrcweir m_aLocalizedName = ObjectNameProvider::getAxisName( m_aObjectCID, xChartModel );
226cdf0e10cSrcweir }
227cdf0e10cSrcweir else if( !m_bAffectsMultipleObjects && ( OBJECTTYPE_GRID == m_eObjectType || OBJECTTYPE_SUBGRID == m_eObjectType ) )
228cdf0e10cSrcweir {
229cdf0e10cSrcweir m_aLocalizedName = ObjectNameProvider::getGridName( m_aObjectCID, xChartModel );
230cdf0e10cSrcweir }
231cdf0e10cSrcweir else if( !m_bAffectsMultipleObjects && OBJECTTYPE_TITLE == m_eObjectType )
232cdf0e10cSrcweir {
233cdf0e10cSrcweir m_aLocalizedName = ObjectNameProvider::getTitleName( m_aObjectCID, xChartModel );
234cdf0e10cSrcweir }
235cdf0e10cSrcweir else
236cdf0e10cSrcweir {
237cdf0e10cSrcweir switch( m_eObjectType )
238cdf0e10cSrcweir {
239cdf0e10cSrcweir case OBJECTTYPE_DATA_POINT:
240cdf0e10cSrcweir case OBJECTTYPE_DATA_LABEL:
241cdf0e10cSrcweir case OBJECTTYPE_DATA_LABELS:
242cdf0e10cSrcweir case OBJECTTYPE_DATA_ERRORS:
243cdf0e10cSrcweir case OBJECTTYPE_DATA_ERRORS_X:
244cdf0e10cSrcweir case OBJECTTYPE_DATA_ERRORS_Y:
245cdf0e10cSrcweir case OBJECTTYPE_DATA_ERRORS_Z:
246cdf0e10cSrcweir case OBJECTTYPE_DATA_AVERAGE_LINE:
247cdf0e10cSrcweir case OBJECTTYPE_DATA_CURVE:
248cdf0e10cSrcweir case OBJECTTYPE_DATA_CURVE_EQUATION:
249cdf0e10cSrcweir if( m_bAffectsMultipleObjects )
250cdf0e10cSrcweir m_aLocalizedName = ObjectNameProvider::getName_ObjectForAllSeries( m_eObjectType );
251cdf0e10cSrcweir else
252cdf0e10cSrcweir m_aLocalizedName = ObjectNameProvider::getName_ObjectForSeries( m_eObjectType, m_aObjectCID, m_xChartDocument );
253cdf0e10cSrcweir break;
254cdf0e10cSrcweir default:
255cdf0e10cSrcweir m_aLocalizedName = ObjectNameProvider::getName(m_eObjectType,m_bAffectsMultipleObjects);
256cdf0e10cSrcweir break;
257cdf0e10cSrcweir }
258cdf0e10cSrcweir }
259cdf0e10cSrcweir }
260cdf0e10cSrcweir }
261cdf0e10cSrcweir
HasGeometryProperties() const262cdf0e10cSrcweir bool ObjectPropertiesDialogParameter::HasGeometryProperties() const
263cdf0e10cSrcweir {
264cdf0e10cSrcweir return m_bHasGeometryProperties;
265cdf0e10cSrcweir }
HasStatisticProperties() const266cdf0e10cSrcweir bool ObjectPropertiesDialogParameter::HasStatisticProperties() const
267cdf0e10cSrcweir {
268cdf0e10cSrcweir return m_bHasStatisticProperties;
269cdf0e10cSrcweir }
ProvidesSecondaryYAxis() const270cdf0e10cSrcweir bool ObjectPropertiesDialogParameter::ProvidesSecondaryYAxis() const
271cdf0e10cSrcweir {
272cdf0e10cSrcweir return m_bProvidesSecondaryYAxis;
273cdf0e10cSrcweir }
ProvidesOverlapAndGapWidth() const274cdf0e10cSrcweir bool ObjectPropertiesDialogParameter::ProvidesOverlapAndGapWidth() const
275cdf0e10cSrcweir {
276cdf0e10cSrcweir return m_bProvidesOverlapAndGapWidth;
277cdf0e10cSrcweir }
ProvidesBarConnectors() const278cdf0e10cSrcweir bool ObjectPropertiesDialogParameter::ProvidesBarConnectors() const
279cdf0e10cSrcweir {
280cdf0e10cSrcweir return m_bProvidesBarConnectors;
281cdf0e10cSrcweir }
HasAreaProperties() const282cdf0e10cSrcweir bool ObjectPropertiesDialogParameter::HasAreaProperties() const
283cdf0e10cSrcweir {
284cdf0e10cSrcweir return m_bHasAreaProperties;
285cdf0e10cSrcweir }
HasSymbolProperties() const286cdf0e10cSrcweir bool ObjectPropertiesDialogParameter::HasSymbolProperties() const
287cdf0e10cSrcweir {
288cdf0e10cSrcweir return m_bHasSymbolProperties;
289cdf0e10cSrcweir }
HasScaleProperties() const290cdf0e10cSrcweir bool ObjectPropertiesDialogParameter::HasScaleProperties() const
291cdf0e10cSrcweir {
292cdf0e10cSrcweir return m_bHasScaleProperties;
293cdf0e10cSrcweir }
CanAxisLabelsBeStaggered() const294cdf0e10cSrcweir bool ObjectPropertiesDialogParameter::CanAxisLabelsBeStaggered() const
295cdf0e10cSrcweir {
296cdf0e10cSrcweir return m_bCanAxisLabelsBeStaggered;
297cdf0e10cSrcweir }
ShowAxisOrigin() const298cdf0e10cSrcweir bool ObjectPropertiesDialogParameter::ShowAxisOrigin() const
299cdf0e10cSrcweir {
300cdf0e10cSrcweir return m_bShowAxisOrigin;
301cdf0e10cSrcweir }
IsSupportingAxisPositioning() const302cdf0e10cSrcweir bool ObjectPropertiesDialogParameter::IsSupportingAxisPositioning() const
303cdf0e10cSrcweir {
304cdf0e10cSrcweir return m_bSupportingAxisPositioning;
305cdf0e10cSrcweir }
IsCrossingAxisIsCategoryAxis() const306cdf0e10cSrcweir bool ObjectPropertiesDialogParameter::IsCrossingAxisIsCategoryAxis() const
307cdf0e10cSrcweir {
308cdf0e10cSrcweir return m_bIsCrossingAxisIsCategoryAxis;
309cdf0e10cSrcweir }
GetCategories() const310cdf0e10cSrcweir const uno::Sequence< rtl::OUString >& ObjectPropertiesDialogParameter::GetCategories() const
311cdf0e10cSrcweir {
312cdf0e10cSrcweir return m_aCategories;
313cdf0e10cSrcweir }
HasNumberProperties() const314cdf0e10cSrcweir bool ObjectPropertiesDialogParameter::HasNumberProperties() const
315cdf0e10cSrcweir {
316cdf0e10cSrcweir return m_bHasNumberProperties;
317cdf0e10cSrcweir }
ProvidesStartingAngle() const318cdf0e10cSrcweir bool ObjectPropertiesDialogParameter::ProvidesStartingAngle() const
319cdf0e10cSrcweir {
320cdf0e10cSrcweir return m_bProvidesStartingAngle;
321cdf0e10cSrcweir }
ProvidesMissingValueTreatments() const322cdf0e10cSrcweir bool ObjectPropertiesDialogParameter::ProvidesMissingValueTreatments() const
323cdf0e10cSrcweir {
324cdf0e10cSrcweir return m_bProvidesMissingValueTreatments;
325cdf0e10cSrcweir }
getDocument() const326cdf0e10cSrcweir uno::Reference< chart2::XChartDocument > ObjectPropertiesDialogParameter::getDocument() const
327cdf0e10cSrcweir {
328cdf0e10cSrcweir return m_xChartDocument;
329cdf0e10cSrcweir }
IsComplexCategoriesAxis() const330cdf0e10cSrcweir bool ObjectPropertiesDialogParameter::IsComplexCategoriesAxis() const
331cdf0e10cSrcweir {
332cdf0e10cSrcweir return m_bComplexCategoriesAxis;
333cdf0e10cSrcweir }
334cdf0e10cSrcweir
335cdf0e10cSrcweir //const sal_uInt16 nNoArrowDlg = 1100;
336cdf0e10cSrcweir const sal_uInt16 nNoArrowNoShadowDlg = 1101;
337cdf0e10cSrcweir
338cdf0e10cSrcweir //-------------------------------------------------------------------
339cdf0e10cSrcweir //-------------------------------------------------------------------
340cdf0e10cSrcweir //-------------------------------------------------------------------
341cdf0e10cSrcweir
setSymbolInformation(SfxItemSet * pSymbolShapeProperties,Graphic * pAutoSymbolGraphic)342cdf0e10cSrcweir void SchAttribTabDlg::setSymbolInformation( SfxItemSet* pSymbolShapeProperties,
343cdf0e10cSrcweir Graphic* pAutoSymbolGraphic )
344cdf0e10cSrcweir {
345cdf0e10cSrcweir m_pSymbolShapeProperties = pSymbolShapeProperties;
346cdf0e10cSrcweir m_pAutoSymbolGraphic = pAutoSymbolGraphic;
347cdf0e10cSrcweir }
348cdf0e10cSrcweir
SetAxisMinorStepWidthForErrorBarDecimals(double fMinorStepWidth)349cdf0e10cSrcweir void SchAttribTabDlg::SetAxisMinorStepWidthForErrorBarDecimals( double fMinorStepWidth )
350cdf0e10cSrcweir {
351cdf0e10cSrcweir m_fAxisMinorStepWidthForErrorBarDecimals = fMinorStepWidth;
352cdf0e10cSrcweir }
353cdf0e10cSrcweir
SchAttribTabDlg(Window * pParent,const SfxItemSet * pAttr,const ObjectPropertiesDialogParameter * pDialogParameter,const ViewElementListProvider * pViewElementListProvider,const uno::Reference<util::XNumberFormatsSupplier> & xNumberFormatsSupplier)354cdf0e10cSrcweir SchAttribTabDlg::SchAttribTabDlg(Window* pParent,
355cdf0e10cSrcweir const SfxItemSet* pAttr,
356cdf0e10cSrcweir const ObjectPropertiesDialogParameter* pDialogParameter,
357cdf0e10cSrcweir const ViewElementListProvider* pViewElementListProvider,
358cdf0e10cSrcweir const uno::Reference< util::XNumberFormatsSupplier >& xNumberFormatsSupplier
359cdf0e10cSrcweir )
360cdf0e10cSrcweir : SfxTabDialog(pParent, SchResId(DLG_OBJECT_PROPERTIES), pAttr)
361cdf0e10cSrcweir , eObjectType(pDialogParameter->getObjectType())
362cdf0e10cSrcweir , nDlgType(nNoArrowNoShadowDlg)
363cdf0e10cSrcweir , nPageType(0)
364cdf0e10cSrcweir , m_pParameter( pDialogParameter )
365cdf0e10cSrcweir , m_pViewElementListProvider( pViewElementListProvider )
366cdf0e10cSrcweir , m_pNumberFormatter(0)
367cdf0e10cSrcweir , m_pSymbolShapeProperties(NULL)
368cdf0e10cSrcweir , m_pAutoSymbolGraphic(NULL)
369cdf0e10cSrcweir , m_fAxisMinorStepWidthForErrorBarDecimals(0.1)
370cdf0e10cSrcweir , m_bOKPressed(false)
371cdf0e10cSrcweir {
372cdf0e10cSrcweir FreeResource();
373cdf0e10cSrcweir
374cdf0e10cSrcweir NumberFormatterWrapper aNumberFormatterWrapper( xNumberFormatsSupplier );
375cdf0e10cSrcweir m_pNumberFormatter = aNumberFormatterWrapper.getSvNumberFormatter();
376cdf0e10cSrcweir
377cdf0e10cSrcweir this->SetText( pDialogParameter->getLocalizedName() );
378cdf0e10cSrcweir
379cdf0e10cSrcweir SvtCJKOptions aCJKOptions;
380cdf0e10cSrcweir
381cdf0e10cSrcweir switch (eObjectType)
382cdf0e10cSrcweir {
383cdf0e10cSrcweir case OBJECTTYPE_TITLE:
384cdf0e10cSrcweir AddTabPage(RID_SVXPAGE_LINE, String(SchResId(STR_PAGE_BORDER)));
385cdf0e10cSrcweir AddTabPage(RID_SVXPAGE_AREA, String(SchResId(STR_PAGE_AREA)));
386cdf0e10cSrcweir AddTabPage(RID_SVXPAGE_TRANSPARENCE, String(SchResId(STR_PAGE_TRANSPARENCY)));
387cdf0e10cSrcweir AddTabPage(RID_SVXPAGE_CHAR_NAME, String(SchResId(STR_PAGE_FONT)));
388cdf0e10cSrcweir AddTabPage(RID_SVXPAGE_CHAR_EFFECTS, String(SchResId(STR_PAGE_FONT_EFFECTS)));
389cdf0e10cSrcweir AddTabPage(TP_ALIGNMENT, String(SchResId(STR_PAGE_ALIGNMENT)), SchAlignmentTabPage::Create, NULL);
390cdf0e10cSrcweir if( aCJKOptions.IsAsianTypographyEnabled() )
391cdf0e10cSrcweir AddTabPage(RID_SVXPAGE_PARA_ASIAN, String(SchResId(STR_PAGE_ASIAN)));
392cdf0e10cSrcweir break;
393cdf0e10cSrcweir
394cdf0e10cSrcweir case OBJECTTYPE_LEGEND:
395cdf0e10cSrcweir AddTabPage(RID_SVXPAGE_LINE, String(SchResId(STR_PAGE_BORDER)));
396cdf0e10cSrcweir AddTabPage(RID_SVXPAGE_AREA, String(SchResId(STR_PAGE_AREA)));
397cdf0e10cSrcweir AddTabPage(RID_SVXPAGE_TRANSPARENCE, String(SchResId(STR_PAGE_TRANSPARENCY)));
398cdf0e10cSrcweir AddTabPage(RID_SVXPAGE_CHAR_NAME, String(SchResId(STR_PAGE_FONT)));
399cdf0e10cSrcweir AddTabPage(RID_SVXPAGE_CHAR_EFFECTS, String(SchResId(STR_PAGE_FONT_EFFECTS)));
400cdf0e10cSrcweir AddTabPage(TP_LEGEND_POS, String(SchResId(STR_PAGE_POSITION)), SchLegendPosTabPage::Create, NULL);
401cdf0e10cSrcweir if( aCJKOptions.IsAsianTypographyEnabled() )
402cdf0e10cSrcweir AddTabPage(RID_SVXPAGE_PARA_ASIAN, String(SchResId(STR_PAGE_ASIAN)));
403cdf0e10cSrcweir break;
404cdf0e10cSrcweir
405cdf0e10cSrcweir case OBJECTTYPE_DATA_SERIES:
406cdf0e10cSrcweir case OBJECTTYPE_DATA_POINT:
407cdf0e10cSrcweir if( m_pParameter->ProvidesSecondaryYAxis() || m_pParameter->ProvidesOverlapAndGapWidth() || m_pParameter->ProvidesMissingValueTreatments() )
408cdf0e10cSrcweir AddTabPage(TP_OPTIONS, String(SchResId(STR_PAGE_OPTIONS)),SchOptionTabPage::Create, NULL);
409cdf0e10cSrcweir if( m_pParameter->ProvidesStartingAngle())
410cdf0e10cSrcweir AddTabPage(TP_POLAROPTIONS, String(SchResId(STR_PAGE_OPTIONS)),PolarOptionsTabPage::Create, NULL);
411cdf0e10cSrcweir
412cdf0e10cSrcweir if( m_pParameter->HasGeometryProperties() )
413cdf0e10cSrcweir AddTabPage(TP_LAYOUT, String(SchResId(STR_PAGE_LAYOUT)),SchLayoutTabPage::Create, NULL);
414cdf0e10cSrcweir
415cdf0e10cSrcweir if(m_pParameter->HasAreaProperties())
416cdf0e10cSrcweir {
417cdf0e10cSrcweir AddTabPage(RID_SVXPAGE_AREA, String(SchResId(STR_PAGE_AREA)));
418cdf0e10cSrcweir AddTabPage(RID_SVXPAGE_TRANSPARENCE, String(SchResId(STR_PAGE_TRANSPARENCY)));
419cdf0e10cSrcweir }
420cdf0e10cSrcweir AddTabPage(RID_SVXPAGE_LINE, String(SchResId( m_pParameter->HasAreaProperties() ? STR_PAGE_BORDER : STR_PAGE_LINE )));
421cdf0e10cSrcweir break;
422cdf0e10cSrcweir
423cdf0e10cSrcweir case OBJECTTYPE_DATA_LABEL:
424cdf0e10cSrcweir case OBJECTTYPE_DATA_LABELS:
425cdf0e10cSrcweir AddTabPage(TP_DATA_DESCR, String(SchResId(STR_OBJECT_DATALABELS)), DataLabelsTabPage::Create, NULL);
426cdf0e10cSrcweir AddTabPage(RID_SVXPAGE_CHAR_NAME, String(SchResId(STR_PAGE_FONT)));
427cdf0e10cSrcweir AddTabPage(RID_SVXPAGE_CHAR_EFFECTS, String(SchResId(STR_PAGE_FONT_EFFECTS)));
428cdf0e10cSrcweir if( aCJKOptions.IsAsianTypographyEnabled() )
429cdf0e10cSrcweir AddTabPage(RID_SVXPAGE_PARA_ASIAN, String(SchResId(STR_PAGE_ASIAN)));
430cdf0e10cSrcweir
431cdf0e10cSrcweir break;
432cdf0e10cSrcweir
433cdf0e10cSrcweir case OBJECTTYPE_AXIS:
434cdf0e10cSrcweir {
435cdf0e10cSrcweir if( m_pParameter->HasScaleProperties() )
436cdf0e10cSrcweir AddTabPage(TP_SCALE, String(SchResId(STR_PAGE_SCALE)), ScaleTabPage::Create, NULL);
437cdf0e10cSrcweir
438cdf0e10cSrcweir if( m_pParameter->HasScaleProperties() )//no positioning page for z axes so far as the tickmarks are not shown so far
439cdf0e10cSrcweir AddTabPage(TP_AXIS_POSITIONS, String(SchResId(STR_PAGE_POSITIONING)), AxisPositionsTabPage::Create, NULL);
440cdf0e10cSrcweir AddTabPage(RID_SVXPAGE_LINE, String(SchResId(STR_PAGE_LINE)));
441cdf0e10cSrcweir AddTabPage(TP_AXIS_LABEL, String(SchResId(STR_OBJECT_LABEL)), SchAxisLabelTabPage::Create, NULL);
442cdf0e10cSrcweir if( m_pParameter->HasNumberProperties() )
443cdf0e10cSrcweir AddTabPage(RID_SVXPAGE_NUMBERFORMAT, String(SchResId(STR_PAGE_NUMBERS)));
444cdf0e10cSrcweir AddTabPage(RID_SVXPAGE_CHAR_NAME, String(SchResId(STR_PAGE_FONT)));
445cdf0e10cSrcweir AddTabPage(RID_SVXPAGE_CHAR_EFFECTS, String(SchResId(STR_PAGE_FONT_EFFECTS)));
446cdf0e10cSrcweir if( aCJKOptions.IsAsianTypographyEnabled() )
447cdf0e10cSrcweir AddTabPage(RID_SVXPAGE_PARA_ASIAN, String(SchResId(STR_PAGE_ASIAN)));
448cdf0e10cSrcweir break;
449cdf0e10cSrcweir }
450cdf0e10cSrcweir
451cdf0e10cSrcweir case OBJECTTYPE_DATA_ERRORS:
452cdf0e10cSrcweir case OBJECTTYPE_DATA_ERRORS_X:
453cdf0e10cSrcweir case OBJECTTYPE_DATA_ERRORS_Y:
454cdf0e10cSrcweir case OBJECTTYPE_DATA_ERRORS_Z:
455cdf0e10cSrcweir AddTabPage(TP_YERRORBAR, String(SchResId(STR_PAGE_YERROR_BARS)), ErrorBarsTabPage::Create, NULL);
456cdf0e10cSrcweir AddTabPage(RID_SVXPAGE_LINE, String(SchResId(STR_PAGE_LINE)));
457cdf0e10cSrcweir break;
458cdf0e10cSrcweir
459cdf0e10cSrcweir case OBJECTTYPE_GRID:
460cdf0e10cSrcweir case OBJECTTYPE_SUBGRID:
461cdf0e10cSrcweir case OBJECTTYPE_DATA_AVERAGE_LINE:
462cdf0e10cSrcweir case OBJECTTYPE_DATA_STOCK_RANGE:
463cdf0e10cSrcweir AddTabPage(RID_SVXPAGE_LINE, String(SchResId(STR_PAGE_LINE)));
464cdf0e10cSrcweir break;
465cdf0e10cSrcweir
466cdf0e10cSrcweir case OBJECTTYPE_DATA_CURVE:
467cdf0e10cSrcweir AddTabPage(TP_TRENDLINE, String(SchResId(STR_PAGE_TRENDLINE_TYPE)), TrendlineTabPage::Create, NULL);
468cdf0e10cSrcweir AddTabPage(RID_SVXPAGE_LINE, String(SchResId(STR_PAGE_LINE)));
469cdf0e10cSrcweir break;
470cdf0e10cSrcweir
471cdf0e10cSrcweir case OBJECTTYPE_DATA_STOCK_LOSS:
472cdf0e10cSrcweir case OBJECTTYPE_DATA_STOCK_GAIN:
473cdf0e10cSrcweir case OBJECTTYPE_PAGE:
474cdf0e10cSrcweir case OBJECTTYPE_DIAGRAM_FLOOR:
475cdf0e10cSrcweir case OBJECTTYPE_DIAGRAM_WALL:
476cdf0e10cSrcweir case OBJECTTYPE_DIAGRAM:
477cdf0e10cSrcweir AddTabPage(RID_SVXPAGE_LINE, String(SchResId(STR_PAGE_BORDER)));
478cdf0e10cSrcweir AddTabPage(RID_SVXPAGE_AREA, String(SchResId(STR_PAGE_AREA)));
479cdf0e10cSrcweir AddTabPage(RID_SVXPAGE_TRANSPARENCE, String(SchResId(STR_PAGE_TRANSPARENCY)));
480cdf0e10cSrcweir break;
481cdf0e10cSrcweir
482cdf0e10cSrcweir case OBJECTTYPE_LEGEND_ENTRY:
483cdf0e10cSrcweir case OBJECTTYPE_AXIS_UNITLABEL:
484cdf0e10cSrcweir case OBJECTTYPE_UNKNOWN:
485cdf0e10cSrcweir // nothing
486cdf0e10cSrcweir break;
487cdf0e10cSrcweir case OBJECTTYPE_DATA_CURVE_EQUATION:
488cdf0e10cSrcweir AddTabPage(RID_SVXPAGE_LINE, String(SchResId(STR_PAGE_BORDER)));
489cdf0e10cSrcweir AddTabPage(RID_SVXPAGE_AREA, String(SchResId(STR_PAGE_AREA)));
490cdf0e10cSrcweir AddTabPage(RID_SVXPAGE_TRANSPARENCE, String(SchResId(STR_PAGE_TRANSPARENCY)));
491cdf0e10cSrcweir AddTabPage(RID_SVXPAGE_CHAR_NAME, String(SchResId(STR_PAGE_FONT)));
492cdf0e10cSrcweir AddTabPage(RID_SVXPAGE_CHAR_EFFECTS, String(SchResId(STR_PAGE_FONT_EFFECTS)));
493cdf0e10cSrcweir AddTabPage(RID_SVXPAGE_NUMBERFORMAT, String(SchResId(STR_PAGE_NUMBERS)));
494cdf0e10cSrcweir if( SvtLanguageOptions().IsCTLFontEnabled() )
495cdf0e10cSrcweir /* When rotation is supported for equation text boxes, use
496cdf0e10cSrcweir SchAlignmentTabPage::Create here. The special
497cdf0e10cSrcweir SchAlignmentTabPage::CreateWithoutRotation can be deleted. */
498cdf0e10cSrcweir AddTabPage(TP_ALIGNMENT, String(SchResId(STR_PAGE_ALIGNMENT)), SchAlignmentTabPage::CreateWithoutRotation, NULL);
499cdf0e10cSrcweir break;
500cdf0e10cSrcweir default:
501cdf0e10cSrcweir break;
502cdf0e10cSrcweir }
503cdf0e10cSrcweir
504cdf0e10cSrcweir // used to find out if user left the dialog with OK. When OK is pressed but
505cdf0e10cSrcweir // no changes were done, Cancel is returned by the SfxTabDialog. See method
506cdf0e10cSrcweir // DialogWasClosedWithOK.
507cdf0e10cSrcweir m_aOriginalOKClickHdl = GetOKButton().GetClickHdl();
508cdf0e10cSrcweir GetOKButton().SetClickHdl( LINK( this, SchAttribTabDlg, OKPressed ));
509cdf0e10cSrcweir }
510cdf0e10cSrcweir
~SchAttribTabDlg()511cdf0e10cSrcweir SchAttribTabDlg::~SchAttribTabDlg()
512cdf0e10cSrcweir {
513cdf0e10cSrcweir delete m_pSymbolShapeProperties;
514cdf0e10cSrcweir delete m_pAutoSymbolGraphic;
515cdf0e10cSrcweir }
516cdf0e10cSrcweir
PageCreated(sal_uInt16 nId,SfxTabPage & rPage)517cdf0e10cSrcweir void SchAttribTabDlg::PageCreated(sal_uInt16 nId, SfxTabPage &rPage)
518cdf0e10cSrcweir {
519cdf0e10cSrcweir SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
520cdf0e10cSrcweir switch (nId)
521cdf0e10cSrcweir {
522cdf0e10cSrcweir case TP_LAYOUT:
523cdf0e10cSrcweir break;
524cdf0e10cSrcweir case RID_SVXPAGE_LINE:
525cdf0e10cSrcweir aSet.Put (SvxColorTableItem(m_pViewElementListProvider->GetColorTable(),SID_COLOR_TABLE));
526cdf0e10cSrcweir aSet.Put (SvxDashListItem(m_pViewElementListProvider->GetDashList(),SID_DASH_LIST));
527cdf0e10cSrcweir aSet.Put (SvxLineEndListItem(m_pViewElementListProvider->GetLineEndList(),SID_LINEEND_LIST));
528cdf0e10cSrcweir aSet.Put (SfxUInt16Item(SID_PAGE_TYPE,nPageType));
529cdf0e10cSrcweir aSet.Put (SfxUInt16Item(SID_DLG_TYPE,nDlgType));
530cdf0e10cSrcweir
531cdf0e10cSrcweir if( m_pParameter->HasSymbolProperties() )
532cdf0e10cSrcweir {
533cdf0e10cSrcweir aSet.Put(OfaPtrItem(SID_OBJECT_LIST,m_pViewElementListProvider->GetSymbolList()));
534cdf0e10cSrcweir if( m_pSymbolShapeProperties )
535cdf0e10cSrcweir aSet.Put(SfxTabDialogItem(SID_ATTR_SET,*m_pSymbolShapeProperties));
536cdf0e10cSrcweir if( m_pAutoSymbolGraphic )
537cdf0e10cSrcweir aSet.Put(SvxGraphicItem(SID_GRAPHIC,*m_pAutoSymbolGraphic));
538cdf0e10cSrcweir }
539cdf0e10cSrcweir rPage.PageCreated(aSet);
540cdf0e10cSrcweir //rPage.ActivatePage(*GetInputSetImpl()); //what for?
541cdf0e10cSrcweir break;
542cdf0e10cSrcweir
543cdf0e10cSrcweir case RID_SVXPAGE_AREA:
544cdf0e10cSrcweir aSet.Put(SvxColorTableItem(m_pViewElementListProvider->GetColorTable(),SID_COLOR_TABLE));
545cdf0e10cSrcweir aSet.Put(SvxGradientListItem(m_pViewElementListProvider->GetGradientList(),SID_GRADIENT_LIST));
546cdf0e10cSrcweir aSet.Put(SvxHatchListItem(m_pViewElementListProvider->GetHatchList(),SID_HATCH_LIST));
547cdf0e10cSrcweir aSet.Put(SvxBitmapListItem(m_pViewElementListProvider->GetBitmapList(),SID_BITMAP_LIST));
548cdf0e10cSrcweir aSet.Put(SfxUInt16Item(SID_PAGE_TYPE,nPageType));
549cdf0e10cSrcweir aSet.Put(SfxUInt16Item(SID_DLG_TYPE,nDlgType));
550cdf0e10cSrcweir rPage.PageCreated(aSet);
551cdf0e10cSrcweir //rPage.ActivatePage(*GetInputSetImpl()); //what for?
552cdf0e10cSrcweir break;
553cdf0e10cSrcweir
554cdf0e10cSrcweir case RID_SVXPAGE_TRANSPARENCE:
555cdf0e10cSrcweir aSet.Put (SfxUInt16Item(SID_PAGE_TYPE,nPageType));
556cdf0e10cSrcweir aSet.Put (SfxUInt16Item(SID_DLG_TYPE,nDlgType));
557cdf0e10cSrcweir rPage.PageCreated(aSet);
558cdf0e10cSrcweir break;
559cdf0e10cSrcweir
560cdf0e10cSrcweir case RID_SVXPAGE_CHAR_NAME:
561cdf0e10cSrcweir
562cdf0e10cSrcweir //CHINA001 ((SvxCharNamePage&)rPage).
563cdf0e10cSrcweir //CHINA001 SetFontList(SvxFontListItem(m_pViewElementListProvider->getFontList()));
564cdf0e10cSrcweir aSet.Put (SvxFontListItem(m_pViewElementListProvider->getFontList(), SID_ATTR_CHAR_FONTLIST)); //CHINA001
565cdf0e10cSrcweir rPage.PageCreated(aSet); //CHINA001
566cdf0e10cSrcweir break;
567cdf0e10cSrcweir
568cdf0e10cSrcweir case RID_SVXPAGE_CHAR_EFFECTS:
569cdf0e10cSrcweir //CHINA001 ((SvxCharEffectsPage&) rPage).DisableControls( DISABLE_CASEMAP );
570cdf0e10cSrcweir aSet.Put (SfxUInt16Item(SID_DISABLE_CTL,DISABLE_CASEMAP)); //CHINA001
571cdf0e10cSrcweir rPage.PageCreated(aSet);
572cdf0e10cSrcweir break;
573cdf0e10cSrcweir
574cdf0e10cSrcweir case TP_AXIS_LABEL:
575cdf0e10cSrcweir {
576cdf0e10cSrcweir bool bShowStaggeringControls = m_pParameter->CanAxisLabelsBeStaggered();
577cdf0e10cSrcweir ((SchAxisLabelTabPage&)rPage).ShowStaggeringControls( bShowStaggeringControls );
578cdf0e10cSrcweir ( dynamic_cast< SchAxisLabelTabPage& >( rPage ) ).SetComplexCategories( m_pParameter->IsComplexCategoriesAxis() );
579cdf0e10cSrcweir break;
580cdf0e10cSrcweir }
581cdf0e10cSrcweir
582cdf0e10cSrcweir case TP_ALIGNMENT:
583cdf0e10cSrcweir break;
584cdf0e10cSrcweir
585cdf0e10cSrcweir
586cdf0e10cSrcweir case TP_AXIS_POSITIONS:
587cdf0e10cSrcweir {
588cdf0e10cSrcweir AxisPositionsTabPage* pPage = dynamic_cast< AxisPositionsTabPage* >( &rPage );
589cdf0e10cSrcweir if(pPage)
590cdf0e10cSrcweir {
591cdf0e10cSrcweir pPage->SetNumFormatter( m_pNumberFormatter );
592cdf0e10cSrcweir if( m_pParameter->IsCrossingAxisIsCategoryAxis() )
593cdf0e10cSrcweir {
594cdf0e10cSrcweir pPage->SetCrossingAxisIsCategoryAxis( m_pParameter->IsCrossingAxisIsCategoryAxis() );
595cdf0e10cSrcweir pPage->SetCategories( m_pParameter->GetCategories() );
596cdf0e10cSrcweir }
597cdf0e10cSrcweir pPage->SupportAxisPositioning( m_pParameter->IsSupportingAxisPositioning() );
598cdf0e10cSrcweir }
599cdf0e10cSrcweir }
600cdf0e10cSrcweir break;
601cdf0e10cSrcweir
602cdf0e10cSrcweir case TP_SCALE:
603cdf0e10cSrcweir {
604cdf0e10cSrcweir ScaleTabPage* pScaleTabPage = dynamic_cast< ScaleTabPage* >( &rPage );
605cdf0e10cSrcweir if(pScaleTabPage)
606cdf0e10cSrcweir {
607cdf0e10cSrcweir pScaleTabPage->SetNumFormatter( m_pNumberFormatter );
608cdf0e10cSrcweir pScaleTabPage->ShowAxisOrigin( m_pParameter->ShowAxisOrigin() );
609cdf0e10cSrcweir }
610cdf0e10cSrcweir }
611cdf0e10cSrcweir break;
612cdf0e10cSrcweir
613cdf0e10cSrcweir case TP_DATA_DESCR:
614cdf0e10cSrcweir {
615cdf0e10cSrcweir DataLabelsTabPage* pLabelPage = dynamic_cast< DataLabelsTabPage* >( &rPage );
616cdf0e10cSrcweir if( pLabelPage )
617cdf0e10cSrcweir pLabelPage->SetNumberFormatter( m_pNumberFormatter );
618cdf0e10cSrcweir }
619cdf0e10cSrcweir break;
620cdf0e10cSrcweir
621cdf0e10cSrcweir case RID_SVXPAGE_NUMBERFORMAT:
622cdf0e10cSrcweir aSet.Put (SvxNumberInfoItem( m_pNumberFormatter, (const sal_uInt16)SID_ATTR_NUMBERFORMAT_INFO));
623cdf0e10cSrcweir rPage.PageCreated(aSet);
624cdf0e10cSrcweir break;
625cdf0e10cSrcweir
626cdf0e10cSrcweir case TP_YERRORBAR:
627cdf0e10cSrcweir {
628cdf0e10cSrcweir ErrorBarsTabPage * pTabPage = dynamic_cast< ErrorBarsTabPage * >( &rPage );
629cdf0e10cSrcweir OSL_ASSERT( pTabPage );
630cdf0e10cSrcweir if( pTabPage )
631cdf0e10cSrcweir {
632cdf0e10cSrcweir pTabPage->SetAxisMinorStepWidthForErrorBarDecimals( m_fAxisMinorStepWidthForErrorBarDecimals );
633cdf0e10cSrcweir pTabPage->SetErrorBarType( ErrorBarResources::ERROR_BAR_Y );
634cdf0e10cSrcweir pTabPage->SetChartDocumentForRangeChoosing( m_pParameter->getDocument());
635cdf0e10cSrcweir }
636cdf0e10cSrcweir break;
637cdf0e10cSrcweir }
638cdf0e10cSrcweir case TP_OPTIONS:
639cdf0e10cSrcweir {
640cdf0e10cSrcweir SchOptionTabPage* pTabPage = dynamic_cast< SchOptionTabPage* >( &rPage );
641cdf0e10cSrcweir if( pTabPage && m_pParameter )
642cdf0e10cSrcweir pTabPage->Init( m_pParameter->ProvidesSecondaryYAxis(), m_pParameter->ProvidesOverlapAndGapWidth(),
643cdf0e10cSrcweir m_pParameter->ProvidesBarConnectors() );
644cdf0e10cSrcweir break;
645cdf0e10cSrcweir }
646cdf0e10cSrcweir }
647cdf0e10cSrcweir }
648cdf0e10cSrcweir
IMPL_LINK(SchAttribTabDlg,OKPressed,void *,EMPTYARG)649cdf0e10cSrcweir IMPL_LINK( SchAttribTabDlg, OKPressed, void * , EMPTYARG )
650cdf0e10cSrcweir {
651cdf0e10cSrcweir m_bOKPressed = true;
652cdf0e10cSrcweir return m_aOriginalOKClickHdl.Call( this );
653cdf0e10cSrcweir }
654cdf0e10cSrcweir
DialogWasClosedWithOK() const655cdf0e10cSrcweir bool SchAttribTabDlg::DialogWasClosedWithOK() const
656cdf0e10cSrcweir {
657cdf0e10cSrcweir return m_bOKPressed;
658cdf0e10cSrcweir }
659cdf0e10cSrcweir
660cdf0e10cSrcweir //.............................................................................
661cdf0e10cSrcweir } //namespace chart
662cdf0e10cSrcweir //.............................................................................
663