xref: /AOO41X/main/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir 
28*cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
29*cdf0e10cSrcweir #include "precompiled_chart2.hxx"
30*cdf0e10cSrcweir #include "tp_SeriesToAxis.hxx"
31*cdf0e10cSrcweir #include "tp_SeriesToAxis.hrc"
32*cdf0e10cSrcweir 
33*cdf0e10cSrcweir #include "ResId.hxx"
34*cdf0e10cSrcweir #include "chartview/ChartSfxItemIds.hxx"
35*cdf0e10cSrcweir #include "NoWarningThisInCTOR.hxx"
36*cdf0e10cSrcweir 
37*cdf0e10cSrcweir // header for class SfxBoolItem
38*cdf0e10cSrcweir #include <svl/eitem.hxx>
39*cdf0e10cSrcweir // header for SfxInt32Item
40*cdf0e10cSrcweir #include <svl/intitem.hxx>
41*cdf0e10cSrcweir //SfxIntegerListItem
42*cdf0e10cSrcweir #include <svl/ilstitem.hxx>
43*cdf0e10cSrcweir #include <svtools/controldims.hrc>
44*cdf0e10cSrcweir 
45*cdf0e10cSrcweir #include <com/sun/star/chart/MissingValueTreatment.hpp>
46*cdf0e10cSrcweir 
47*cdf0e10cSrcweir //.............................................................................
48*cdf0e10cSrcweir namespace chart
49*cdf0e10cSrcweir {
50*cdf0e10cSrcweir //.............................................................................
51*cdf0e10cSrcweir 
52*cdf0e10cSrcweir SchOptionTabPage::SchOptionTabPage(Window* pWindow,const SfxItemSet& rInAttrs) :
53*cdf0e10cSrcweir 	SfxTabPage(pWindow, SchResId(TP_OPTIONS), rInAttrs),
54*cdf0e10cSrcweir 	aGrpAxis(this, SchResId(GRP_OPT_AXIS)),
55*cdf0e10cSrcweir 	aRbtAxis1(this,SchResId(RBT_OPT_AXIS_1)),
56*cdf0e10cSrcweir 	aRbtAxis2(this,SchResId(RBT_OPT_AXIS_2)),
57*cdf0e10cSrcweir 
58*cdf0e10cSrcweir 	aGrpBar(this, SchResId(GB_BAR)),
59*cdf0e10cSrcweir 	aFTGap(this,SchResId(FT_GAP)),
60*cdf0e10cSrcweir 	aMTGap(this,SchResId(MT_GAP)),
61*cdf0e10cSrcweir 	aFTOverlap(this,SchResId(FT_OVERLAP)),
62*cdf0e10cSrcweir 	aMTOverlap(this,SchResId(MT_OVERLAP)),
63*cdf0e10cSrcweir 	aCBConnect(this,SchResId(CB_CONNECTOR)),
64*cdf0e10cSrcweir     aCBAxisSideBySide(this,SchResId(CB_BARS_SIDE_BY_SIDE)),
65*cdf0e10cSrcweir     m_aFL_PlotOptions(this,SchResId(FL_PLOT_OPTIONS)),
66*cdf0e10cSrcweir     m_aFT_MissingValues(this,SchResId(FT_MISSING_VALUES)),
67*cdf0e10cSrcweir     m_aRB_DontPaint(this,SchResId(RB_DONT_PAINT)),
68*cdf0e10cSrcweir     m_aRB_AssumeZero(this,SchResId(RB_ASSUME_ZERO)),
69*cdf0e10cSrcweir     m_aRB_ContinueLine(this,SchResId(RB_CONTINUE_LINE)),
70*cdf0e10cSrcweir     m_aCBIncludeHiddenCells(this,SchResId(CB_INCLUDE_HIDDEN_CELLS)),
71*cdf0e10cSrcweir     m_bProvidesSecondaryYAxis(true),
72*cdf0e10cSrcweir     m_bProvidesOverlapAndGapWidth(false)
73*cdf0e10cSrcweir {
74*cdf0e10cSrcweir 	FreeResource();
75*cdf0e10cSrcweir 
76*cdf0e10cSrcweir     aRbtAxis1.SetClickHdl( LINK( this, SchOptionTabPage, EnableHdl ));
77*cdf0e10cSrcweir     aRbtAxis2.SetClickHdl( LINK( this, SchOptionTabPage, EnableHdl ));
78*cdf0e10cSrcweir }
79*cdf0e10cSrcweir 
80*cdf0e10cSrcweir SchOptionTabPage::~SchOptionTabPage()
81*cdf0e10cSrcweir {
82*cdf0e10cSrcweir }
83*cdf0e10cSrcweir 
84*cdf0e10cSrcweir IMPL_LINK( SchOptionTabPage, EnableHdl, RadioButton *, EMPTYARG )
85*cdf0e10cSrcweir {
86*cdf0e10cSrcweir     if( m_nAllSeriesAxisIndex == 0 )
87*cdf0e10cSrcweir         aCBAxisSideBySide.Enable( aRbtAxis2.IsChecked());
88*cdf0e10cSrcweir     else if( m_nAllSeriesAxisIndex == 1 )
89*cdf0e10cSrcweir         aCBAxisSideBySide.Enable( aRbtAxis1.IsChecked());
90*cdf0e10cSrcweir 
91*cdf0e10cSrcweir     return 0;
92*cdf0e10cSrcweir }
93*cdf0e10cSrcweir 
94*cdf0e10cSrcweir SfxTabPage* SchOptionTabPage::Create(Window* pWindow,const SfxItemSet& rOutAttrs)
95*cdf0e10cSrcweir {
96*cdf0e10cSrcweir 	return new SchOptionTabPage(pWindow, rOutAttrs);
97*cdf0e10cSrcweir }
98*cdf0e10cSrcweir 
99*cdf0e10cSrcweir sal_Bool SchOptionTabPage::FillItemSet(SfxItemSet& rOutAttrs)
100*cdf0e10cSrcweir {
101*cdf0e10cSrcweir 	if(aRbtAxis2.IsChecked())
102*cdf0e10cSrcweir 		rOutAttrs.Put(SfxInt32Item(SCHATTR_AXIS,CHART_AXIS_SECONDARY_Y));
103*cdf0e10cSrcweir 	else
104*cdf0e10cSrcweir 		rOutAttrs.Put(SfxInt32Item(SCHATTR_AXIS,CHART_AXIS_PRIMARY_Y));
105*cdf0e10cSrcweir 
106*cdf0e10cSrcweir 	if(aMTGap.IsVisible())
107*cdf0e10cSrcweir 		rOutAttrs.Put(SfxInt32Item(SCHATTR_BAR_GAPWIDTH,static_cast< sal_Int32 >( aMTGap.GetValue())));
108*cdf0e10cSrcweir 
109*cdf0e10cSrcweir 	if(aMTOverlap.IsVisible())
110*cdf0e10cSrcweir 		rOutAttrs.Put(SfxInt32Item(SCHATTR_BAR_OVERLAP,static_cast< sal_Int32 >( aMTOverlap.GetValue())));
111*cdf0e10cSrcweir 
112*cdf0e10cSrcweir 	if(aCBConnect.IsVisible())
113*cdf0e10cSrcweir 		rOutAttrs.Put(SfxBoolItem(SCHATTR_BAR_CONNECT,aCBConnect.IsChecked()));
114*cdf0e10cSrcweir 
115*cdf0e10cSrcweir     // model property is "group bars per axis", UI feature is the other way
116*cdf0e10cSrcweir     // round: "show bars side by side"
117*cdf0e10cSrcweir     if(aCBAxisSideBySide.IsVisible())
118*cdf0e10cSrcweir         rOutAttrs.Put(SfxBoolItem(SCHATTR_GROUP_BARS_PER_AXIS, ! aCBAxisSideBySide.IsChecked()));
119*cdf0e10cSrcweir 
120*cdf0e10cSrcweir     if(m_aRB_DontPaint.IsChecked())
121*cdf0e10cSrcweir         rOutAttrs.Put(SfxInt32Item(SCHATTR_MISSING_VALUE_TREATMENT,::com::sun::star::chart::MissingValueTreatment::LEAVE_GAP));
122*cdf0e10cSrcweir     else if(m_aRB_AssumeZero.IsChecked())
123*cdf0e10cSrcweir         rOutAttrs.Put(SfxInt32Item(SCHATTR_MISSING_VALUE_TREATMENT,::com::sun::star::chart::MissingValueTreatment::USE_ZERO));
124*cdf0e10cSrcweir     else if(m_aRB_ContinueLine.IsChecked())
125*cdf0e10cSrcweir         rOutAttrs.Put(SfxInt32Item(SCHATTR_MISSING_VALUE_TREATMENT,::com::sun::star::chart::MissingValueTreatment::CONTINUE));
126*cdf0e10cSrcweir 
127*cdf0e10cSrcweir     if (m_aCBIncludeHiddenCells.IsVisible())
128*cdf0e10cSrcweir         rOutAttrs.Put(SfxBoolItem(SCHATTR_INCLUDE_HIDDEN_CELLS, m_aCBIncludeHiddenCells.IsChecked()));
129*cdf0e10cSrcweir 
130*cdf0e10cSrcweir 	return sal_True;
131*cdf0e10cSrcweir }
132*cdf0e10cSrcweir 
133*cdf0e10cSrcweir void SchOptionTabPage::Reset(const SfxItemSet& rInAttrs)
134*cdf0e10cSrcweir {
135*cdf0e10cSrcweir 	const SfxPoolItem *pPoolItem = NULL;
136*cdf0e10cSrcweir 
137*cdf0e10cSrcweir 	aRbtAxis1.Check(sal_True);
138*cdf0e10cSrcweir 	aRbtAxis2.Check(sal_False);
139*cdf0e10cSrcweir 	if (rInAttrs.GetItemState(SCHATTR_AXIS,sal_True, &pPoolItem) == SFX_ITEM_SET)
140*cdf0e10cSrcweir 	{
141*cdf0e10cSrcweir 		long nVal=((const SfxInt32Item*)pPoolItem)->GetValue();
142*cdf0e10cSrcweir 		if(nVal==CHART_AXIS_SECONDARY_Y)
143*cdf0e10cSrcweir 		{
144*cdf0e10cSrcweir 			aRbtAxis2.Check(sal_True);
145*cdf0e10cSrcweir 			aRbtAxis1.Check(sal_False);
146*cdf0e10cSrcweir 		}
147*cdf0e10cSrcweir 	}
148*cdf0e10cSrcweir 
149*cdf0e10cSrcweir 	long nTmp;
150*cdf0e10cSrcweir 	if (rInAttrs.GetItemState(SCHATTR_BAR_GAPWIDTH, sal_True, &pPoolItem) == SFX_ITEM_SET)
151*cdf0e10cSrcweir 	{
152*cdf0e10cSrcweir 		nTmp = (long)((const SfxInt32Item*)pPoolItem)->GetValue();
153*cdf0e10cSrcweir 		aMTGap.SetValue(nTmp);
154*cdf0e10cSrcweir 	}
155*cdf0e10cSrcweir 
156*cdf0e10cSrcweir 	if (rInAttrs.GetItemState(SCHATTR_BAR_OVERLAP, sal_True, &pPoolItem) == SFX_ITEM_SET)
157*cdf0e10cSrcweir 	{
158*cdf0e10cSrcweir 		nTmp = (long)((const SfxInt32Item*)pPoolItem)->GetValue();
159*cdf0e10cSrcweir 		aMTOverlap.SetValue(nTmp);
160*cdf0e10cSrcweir 	}
161*cdf0e10cSrcweir 
162*cdf0e10cSrcweir 	if (rInAttrs.GetItemState(SCHATTR_BAR_CONNECT, sal_True, &pPoolItem) == SFX_ITEM_SET)
163*cdf0e10cSrcweir 	{
164*cdf0e10cSrcweir 		sal_Bool bCheck = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue();
165*cdf0e10cSrcweir 		aCBConnect.Check(bCheck);
166*cdf0e10cSrcweir 	}
167*cdf0e10cSrcweir 
168*cdf0e10cSrcweir     if (rInAttrs.GetItemState(SCHATTR_AXIS_FOR_ALL_SERIES, sal_True, &pPoolItem) == SFX_ITEM_SET)
169*cdf0e10cSrcweir     {
170*cdf0e10cSrcweir         m_nAllSeriesAxisIndex = static_cast< const SfxInt32Item * >( pPoolItem )->GetValue();
171*cdf0e10cSrcweir         aCBAxisSideBySide.Disable();
172*cdf0e10cSrcweir     }
173*cdf0e10cSrcweir     if (rInAttrs.GetItemState(SCHATTR_GROUP_BARS_PER_AXIS, sal_True, &pPoolItem) == SFX_ITEM_SET)
174*cdf0e10cSrcweir     {
175*cdf0e10cSrcweir         // model property is "group bars per axis", UI feature is the other way
176*cdf0e10cSrcweir         // round: "show bars side by side"
177*cdf0e10cSrcweir 		sal_Bool bCheck = ! static_cast< const SfxBoolItem * >( pPoolItem )->GetValue();
178*cdf0e10cSrcweir         aCBAxisSideBySide.Check( bCheck );
179*cdf0e10cSrcweir     }
180*cdf0e10cSrcweir     else
181*cdf0e10cSrcweir     {
182*cdf0e10cSrcweir         aCBAxisSideBySide.Show(sal_False);
183*cdf0e10cSrcweir     }
184*cdf0e10cSrcweir 
185*cdf0e10cSrcweir 
186*cdf0e10cSrcweir     //missing value treatment
187*cdf0e10cSrcweir     {
188*cdf0e10cSrcweir         ::com::sun::star::uno::Sequence < sal_Int32 > aMissingValueTreatments;
189*cdf0e10cSrcweir         if( rInAttrs.GetItemState(SCHATTR_AVAILABLE_MISSING_VALUE_TREATMENTS, sal_True, &pPoolItem) == SFX_ITEM_SET )
190*cdf0e10cSrcweir             aMissingValueTreatments =((const SfxIntegerListItem*)pPoolItem)->GetConstSequence();
191*cdf0e10cSrcweir 
192*cdf0e10cSrcweir         if ( aMissingValueTreatments.getLength()>1 && rInAttrs.GetItemState(SCHATTR_MISSING_VALUE_TREATMENT,sal_True, &pPoolItem) == SFX_ITEM_SET)
193*cdf0e10cSrcweir         {
194*cdf0e10cSrcweir             m_aRB_DontPaint.Enable(sal_False);
195*cdf0e10cSrcweir             m_aRB_AssumeZero.Enable(sal_False);
196*cdf0e10cSrcweir             m_aRB_ContinueLine.Enable(sal_False);
197*cdf0e10cSrcweir 
198*cdf0e10cSrcweir             for( sal_Int32 nN =0; nN<aMissingValueTreatments.getLength(); nN++ )
199*cdf0e10cSrcweir             {
200*cdf0e10cSrcweir                 sal_Int32 nVal = aMissingValueTreatments[nN];
201*cdf0e10cSrcweir                 if(nVal==::com::sun::star::chart::MissingValueTreatment::LEAVE_GAP)
202*cdf0e10cSrcweir                     m_aRB_DontPaint.Enable(sal_True);
203*cdf0e10cSrcweir                 else if(nVal==::com::sun::star::chart::MissingValueTreatment::USE_ZERO)
204*cdf0e10cSrcweir                     m_aRB_AssumeZero.Enable(sal_True);
205*cdf0e10cSrcweir                 else if(nVal==::com::sun::star::chart::MissingValueTreatment::CONTINUE)
206*cdf0e10cSrcweir                     m_aRB_ContinueLine.Enable(sal_True);
207*cdf0e10cSrcweir             }
208*cdf0e10cSrcweir 
209*cdf0e10cSrcweir             long nVal=((const SfxInt32Item*)pPoolItem)->GetValue();
210*cdf0e10cSrcweir             if(nVal==::com::sun::star::chart::MissingValueTreatment::LEAVE_GAP)
211*cdf0e10cSrcweir                 m_aRB_DontPaint.Check(sal_True);
212*cdf0e10cSrcweir             else if(nVal==::com::sun::star::chart::MissingValueTreatment::USE_ZERO)
213*cdf0e10cSrcweir                 m_aRB_AssumeZero.Check(sal_True);
214*cdf0e10cSrcweir             else if(nVal==::com::sun::star::chart::MissingValueTreatment::CONTINUE)
215*cdf0e10cSrcweir                 m_aRB_ContinueLine.Check(sal_True);
216*cdf0e10cSrcweir         }
217*cdf0e10cSrcweir         else
218*cdf0e10cSrcweir         {
219*cdf0e10cSrcweir             m_aFT_MissingValues.Show(sal_False);
220*cdf0e10cSrcweir             m_aRB_DontPaint.Show(sal_False);
221*cdf0e10cSrcweir             m_aRB_AssumeZero.Show(sal_False);
222*cdf0e10cSrcweir             m_aRB_ContinueLine.Show(sal_False);
223*cdf0e10cSrcweir         }
224*cdf0e10cSrcweir     }
225*cdf0e10cSrcweir 
226*cdf0e10cSrcweir     // Include hidden cells
227*cdf0e10cSrcweir     if (rInAttrs.GetItemState(SCHATTR_INCLUDE_HIDDEN_CELLS, sal_True, &pPoolItem) == SFX_ITEM_SET)
228*cdf0e10cSrcweir     {
229*cdf0e10cSrcweir         bool bVal = static_cast<const SfxBoolItem*>(pPoolItem)->GetValue();
230*cdf0e10cSrcweir         m_aCBIncludeHiddenCells.Check(bVal);
231*cdf0e10cSrcweir     }
232*cdf0e10cSrcweir     else
233*cdf0e10cSrcweir     {
234*cdf0e10cSrcweir         m_aCBIncludeHiddenCells.Show(sal_False);
235*cdf0e10cSrcweir         if(!m_aFT_MissingValues.IsVisible())
236*cdf0e10cSrcweir             m_aFL_PlotOptions.Show(sal_False);
237*cdf0e10cSrcweir     }
238*cdf0e10cSrcweir 
239*cdf0e10cSrcweir     AdaptControlPositionsAndVisibility();
240*cdf0e10cSrcweir }
241*cdf0e10cSrcweir 
242*cdf0e10cSrcweir void SchOptionTabPage::Init( bool bProvidesSecondaryYAxis, bool bProvidesOverlapAndGapWidth, bool bProvidesBarConnectors )
243*cdf0e10cSrcweir {
244*cdf0e10cSrcweir     m_bProvidesSecondaryYAxis = bProvidesSecondaryYAxis;
245*cdf0e10cSrcweir     m_bProvidesOverlapAndGapWidth = bProvidesOverlapAndGapWidth;
246*cdf0e10cSrcweir     m_bProvidesBarConnectors = bProvidesBarConnectors;
247*cdf0e10cSrcweir 
248*cdf0e10cSrcweir     AdaptControlPositionsAndVisibility();
249*cdf0e10cSrcweir }
250*cdf0e10cSrcweir 
251*cdf0e10cSrcweir void lcl_offsetControl(Control& rCtrl, long nXOffset, long nYOffset )
252*cdf0e10cSrcweir {
253*cdf0e10cSrcweir     Point aPos = rCtrl.GetPosPixel();
254*cdf0e10cSrcweir     rCtrl.SetPosPixel( Point(aPos.getX() + nXOffset, aPos.getY() + nYOffset) );
255*cdf0e10cSrcweir }
256*cdf0e10cSrcweir 
257*cdf0e10cSrcweir void lcl_optimzeRadioButtonSize( RadioButton& rCtrl )
258*cdf0e10cSrcweir {
259*cdf0e10cSrcweir     rCtrl.SetSizePixel( rCtrl.CalcMinimumSize() );
260*cdf0e10cSrcweir }
261*cdf0e10cSrcweir 
262*cdf0e10cSrcweir void SchOptionTabPage::AdaptControlPositionsAndVisibility()
263*cdf0e10cSrcweir {
264*cdf0e10cSrcweir     aRbtAxis1.Show(m_bProvidesSecondaryYAxis);
265*cdf0e10cSrcweir     aRbtAxis2.Show(m_bProvidesSecondaryYAxis);
266*cdf0e10cSrcweir     aGrpAxis.Show(m_bProvidesSecondaryYAxis);
267*cdf0e10cSrcweir 
268*cdf0e10cSrcweir 	aMTGap.Show(m_bProvidesOverlapAndGapWidth);
269*cdf0e10cSrcweir 	aFTGap.Show(m_bProvidesOverlapAndGapWidth);
270*cdf0e10cSrcweir 
271*cdf0e10cSrcweir 	aMTOverlap.Show(m_bProvidesOverlapAndGapWidth);
272*cdf0e10cSrcweir 	aFTOverlap.Show(m_bProvidesOverlapAndGapWidth);
273*cdf0e10cSrcweir 
274*cdf0e10cSrcweir     aCBConnect.Show(m_bProvidesBarConnectors);
275*cdf0e10cSrcweir 
276*cdf0e10cSrcweir     if( !aMTGap.IsVisible() && !aMTOverlap.IsVisible() )
277*cdf0e10cSrcweir     {
278*cdf0e10cSrcweir 		aGrpBar.Show(sal_False);
279*cdf0e10cSrcweir 		Point aPos;
280*cdf0e10cSrcweir 		if( !aRbtAxis1.IsVisible() && !aRbtAxis2.IsVisible() )
281*cdf0e10cSrcweir 			aPos = aGrpAxis.GetPosPixel();
282*cdf0e10cSrcweir 	    else
283*cdf0e10cSrcweir             aPos = aGrpBar.GetPosPixel();
284*cdf0e10cSrcweir 
285*cdf0e10cSrcweir         long nYOffset = aPos.getY() - m_aFL_PlotOptions.GetPosPixel().getY();
286*cdf0e10cSrcweir         lcl_offsetControl(m_aFL_PlotOptions,       0, nYOffset);
287*cdf0e10cSrcweir         lcl_offsetControl(m_aFT_MissingValues,     0, nYOffset);
288*cdf0e10cSrcweir         lcl_offsetControl(m_aRB_DontPaint,         0, nYOffset);
289*cdf0e10cSrcweir         lcl_offsetControl(m_aRB_AssumeZero,        0, nYOffset);
290*cdf0e10cSrcweir         lcl_offsetControl(m_aRB_ContinueLine,      0, nYOffset);
291*cdf0e10cSrcweir         lcl_offsetControl(m_aCBIncludeHiddenCells, 0, nYOffset);
292*cdf0e10cSrcweir     }
293*cdf0e10cSrcweir 
294*cdf0e10cSrcweir     m_aFT_MissingValues.SetSizePixel( m_aFT_MissingValues.CalcMinimumSize() );
295*cdf0e10cSrcweir     lcl_optimzeRadioButtonSize( m_aRB_DontPaint );
296*cdf0e10cSrcweir     lcl_optimzeRadioButtonSize( m_aRB_AssumeZero );
297*cdf0e10cSrcweir     lcl_optimzeRadioButtonSize( m_aRB_ContinueLine );
298*cdf0e10cSrcweir 
299*cdf0e10cSrcweir     Size aControlDistance( m_aFT_MissingValues.LogicToPixel( Size(RSC_SP_CTRL_DESC_X,RSC_SP_CTRL_GROUP_Y), MapMode(MAP_APPFONT) ) );
300*cdf0e10cSrcweir     long nXOffset = m_aFT_MissingValues.GetPosPixel().getX() + m_aFT_MissingValues.GetSizePixel().getWidth() + aControlDistance.getWidth() - m_aRB_DontPaint.GetPosPixel().getX();
301*cdf0e10cSrcweir     lcl_offsetControl(m_aRB_DontPaint,         nXOffset, 0);
302*cdf0e10cSrcweir     lcl_offsetControl(m_aRB_AssumeZero,        nXOffset, 0);
303*cdf0e10cSrcweir     lcl_offsetControl(m_aRB_ContinueLine,      nXOffset, 0);
304*cdf0e10cSrcweir 
305*cdf0e10cSrcweir     if( !m_aFT_MissingValues.IsVisible() )
306*cdf0e10cSrcweir     {
307*cdf0e10cSrcweir         //for example for stock charts
308*cdf0e10cSrcweir         m_aCBIncludeHiddenCells.SetPosPixel( m_aFT_MissingValues.GetPosPixel() );
309*cdf0e10cSrcweir     }
310*cdf0e10cSrcweir }
311*cdf0e10cSrcweir //.............................................................................
312*cdf0e10cSrcweir } //namespace chart
313*cdf0e10cSrcweir //.............................................................................
314