Lines 81-87
Link Here
|
81 |
{ |
81 |
{ |
82 |
//............................................................................. |
82 |
//............................................................................. |
83 |
|
83 |
|
84 |
SchScaleYAxisTabPage::SchScaleYAxisTabPage(Window* pWindow,const SfxItemSet& rInAttrs) : |
84 |
ScaleTabPage::ScaleTabPage(Window* pWindow,const SfxItemSet& rInAttrs, const ScalePageType& rScalePageType ) : |
85 |
SfxTabPage(pWindow, SchResId(TP_SCALE_Y), rInAttrs), |
85 |
SfxTabPage(pWindow, SchResId(TP_SCALE_Y), rInAttrs), |
86 |
|
86 |
|
87 |
aFlScale(this, SchResId(FL_SCALE_Y)), |
87 |
aFlScale(this, SchResId(FL_SCALE_Y)), |
Lines 101-106
Link Here
|
101 |
aFmtFldOrigin(this, SchResId(EDT_ORIGIN)), |
101 |
aFmtFldOrigin(this, SchResId(EDT_ORIGIN)), |
102 |
aCbxAutoOrigin(this, SchResId(CBX_AUTO_ORIGIN)), |
102 |
aCbxAutoOrigin(this, SchResId(CBX_AUTO_ORIGIN)), |
103 |
aCbxLogarithm(this, SchResId(CBX_LOGARITHM)), |
103 |
aCbxLogarithm(this, SchResId(CBX_LOGARITHM)), |
|
|
104 |
aCbxReverse(this, SchResId(CBX_REVERSE)), |
104 |
|
105 |
|
105 |
aFlTicks(this,SchResId(FL_TICKS)), |
106 |
aFlTicks(this,SchResId(FL_TICKS)), |
106 |
aCbxTicksInner(this, SchResId(CBX_TICKS_INNER)), |
107 |
aCbxTicksInner(this, SchResId(CBX_TICKS_INNER)), |
Lines 121-137
Link Here
|
121 |
FreeResource(); |
122 |
FreeResource(); |
122 |
SetExchangeSupport(); |
123 |
SetExchangeSupport(); |
123 |
|
124 |
|
124 |
aCbxAutoMin.SetClickHdl(LINK(this, SchScaleYAxisTabPage, EnableValueHdl)); |
125 |
EnableControls( rScalePageType ); |
125 |
aCbxAutoMax.SetClickHdl(LINK(this, SchScaleYAxisTabPage, EnableValueHdl)); |
126 |
|
126 |
aCbxAutoStepMain.SetClickHdl(LINK(this, SchScaleYAxisTabPage, EnableValueHdl)); |
127 |
aCbxAutoMin.SetClickHdl(LINK(this, ScaleTabPage, EnableValueHdl)); |
127 |
aCbxAutoStepHelp.SetClickHdl(LINK(this, SchScaleYAxisTabPage, EnableValueHdl)); |
128 |
aCbxAutoMax.SetClickHdl(LINK(this, ScaleTabPage, EnableValueHdl)); |
128 |
aCbxAutoOrigin.SetClickHdl(LINK(this, SchScaleYAxisTabPage, EnableValueHdl)); |
129 |
aCbxAutoStepMain.SetClickHdl(LINK(this, ScaleTabPage, EnableValueHdl)); |
|
|
130 |
aCbxAutoStepHelp.SetClickHdl(LINK(this, ScaleTabPage, EnableValueHdl)); |
131 |
aCbxAutoOrigin.SetClickHdl(LINK(this, ScaleTabPage, EnableValueHdl)); |
129 |
const SfxPoolItem *pPoolItem = NULL; |
132 |
const SfxPoolItem *pPoolItem = NULL; |
130 |
if (rInAttrs.GetItemState(SCHATTR_AXISTYPE, TRUE, &pPoolItem) == SFX_ITEM_SET) |
133 |
if (rInAttrs.GetItemState(SCHATTR_AXISTYPE, TRUE, &pPoolItem) == SFX_ITEM_SET) |
131 |
nAxisType = (int) ((const SfxInt32Item*)pPoolItem)->GetValue(); |
134 |
nAxisType = (int) ((const SfxInt32Item*)pPoolItem)->GetValue(); |
132 |
} |
135 |
} |
133 |
|
136 |
|
134 |
IMPL_LINK( SchScaleYAxisTabPage, EnableValueHdl, CheckBox *, pCbx ) |
137 |
void ScaleTabPage::EnableControls( const ScalePageType& rScalePageType ) |
|
|
138 |
{ |
139 |
aFlScale.Enable( ValueScalePage == rScalePageType || PercentScalePage == rScalePageType ); |
140 |
aTxtMin.Enable( ValueScalePage == rScalePageType || PercentScalePage == rScalePageType ); |
141 |
aFmtFldMin.Enable( ValueScalePage == rScalePageType || PercentScalePage == rScalePageType ); |
142 |
aCbxAutoMin.Enable( ValueScalePage == rScalePageType || PercentScalePage == rScalePageType ); |
143 |
aTxtMax.Enable( ValueScalePage == rScalePageType || PercentScalePage == rScalePageType ); |
144 |
aFmtFldMax.Enable( ValueScalePage == rScalePageType || PercentScalePage == rScalePageType ); |
145 |
aCbxAutoMax.Enable( ValueScalePage == rScalePageType || PercentScalePage == rScalePageType ); |
146 |
aTxtMain.Enable( ValueScalePage == rScalePageType || PercentScalePage == rScalePageType ); |
147 |
aFmtFldStepMain.Enable( ValueScalePage == rScalePageType || PercentScalePage == rScalePageType ); |
148 |
aCbxAutoStepMain.Enable( ValueScalePage == rScalePageType || PercentScalePage == rScalePageType ); |
149 |
aTxtHelp.Enable( ValueScalePage == rScalePageType || PercentScalePage == rScalePageType ); |
150 |
aMtStepHelp.Enable( ValueScalePage == rScalePageType || PercentScalePage == rScalePageType ); |
151 |
aCbxAutoStepHelp.Enable( ValueScalePage == rScalePageType || PercentScalePage == rScalePageType ); |
152 |
aTxtOrigin.Enable( ValueScalePage == rScalePageType || PercentScalePage == rScalePageType ); |
153 |
aFmtFldOrigin.Enable( ValueScalePage == rScalePageType || PercentScalePage == rScalePageType ); |
154 |
aCbxAutoOrigin.Enable( ValueScalePage == rScalePageType || PercentScalePage == rScalePageType ); |
155 |
aCbxLogarithm.Enable( ValueScalePage == rScalePageType || PercentScalePage == rScalePageType ); |
156 |
} |
157 |
|
158 |
IMPL_LINK( ScaleTabPage, EnableValueHdl, CheckBox *, pCbx ) |
135 |
{ |
159 |
{ |
136 |
if (pCbx == &aCbxAutoMin) |
160 |
if (pCbx == &aCbxAutoMin) |
137 |
{ |
161 |
{ |
Lines 157-168
Link Here
|
157 |
return 0; |
181 |
return 0; |
158 |
} |
182 |
} |
159 |
|
183 |
|
160 |
SfxTabPage* SchScaleYAxisTabPage::Create(Window* pWindow,const SfxItemSet& rOutAttrs) |
184 |
SfxTabPage* ScaleTabPage::CreateValueScalePage(Window* pWindow,const SfxItemSet& rOutAttrs) |
|
|
185 |
{ |
186 |
return new ScaleTabPage(pWindow, rOutAttrs, ValueScalePage ); |
187 |
} |
188 |
|
189 |
SfxTabPage* ScaleTabPage::CreatePercentAxisScalePage(Window* pWindow,const SfxItemSet& rOutAttrs) |
190 |
{ |
191 |
return new ScaleTabPage(pWindow, rOutAttrs, PercentScalePage ); |
192 |
} |
193 |
|
194 |
SfxTabPage* ScaleTabPage::CreateCategroyScalePage(Window* pWindow,const SfxItemSet& rOutAttrs) |
161 |
{ |
195 |
{ |
162 |
return new SchScaleYAxisTabPage(pWindow, rOutAttrs); |
196 |
return new ScaleTabPage(pWindow, rOutAttrs, CategroyScalePage ); |
163 |
} |
197 |
} |
164 |
|
198 |
|
165 |
BOOL SchScaleYAxisTabPage::FillItemSet(SfxItemSet& rOutAttrs) |
199 |
BOOL ScaleTabPage::FillItemSet(SfxItemSet& rOutAttrs) |
166 |
{ |
200 |
{ |
167 |
DBG_ASSERT( pNumFormatter, "No NumberFormatter available" ); |
201 |
DBG_ASSERT( pNumFormatter, "No NumberFormatter available" ); |
168 |
|
202 |
|
Lines 186-191
Link Here
|
186 |
rOutAttrs.Put(SfxBoolItem(SCHATTR_AXIS_AUTO_STEP_HELP,aCbxAutoStepHelp.IsChecked())); |
220 |
rOutAttrs.Put(SfxBoolItem(SCHATTR_AXIS_AUTO_STEP_HELP,aCbxAutoStepHelp.IsChecked())); |
187 |
rOutAttrs.Put(SfxBoolItem(SCHATTR_AXIS_AUTO_ORIGIN ,aCbxAutoOrigin.IsChecked())); |
221 |
rOutAttrs.Put(SfxBoolItem(SCHATTR_AXIS_AUTO_ORIGIN ,aCbxAutoOrigin.IsChecked())); |
188 |
rOutAttrs.Put(SfxBoolItem(SCHATTR_AXIS_LOGARITHM ,aCbxLogarithm.IsChecked())); |
222 |
rOutAttrs.Put(SfxBoolItem(SCHATTR_AXIS_LOGARITHM ,aCbxLogarithm.IsChecked())); |
|
|
223 |
rOutAttrs.Put(SfxBoolItem(SCHATTR_AXIS_REVERSE ,aCbxReverse.IsChecked())); |
189 |
rOutAttrs.Put(SvxDoubleItem(fMax , SCHATTR_AXIS_MAX)); |
224 |
rOutAttrs.Put(SvxDoubleItem(fMax , SCHATTR_AXIS_MAX)); |
190 |
rOutAttrs.Put(SvxDoubleItem(fMin , SCHATTR_AXIS_MIN)); |
225 |
rOutAttrs.Put(SvxDoubleItem(fMin , SCHATTR_AXIS_MIN)); |
191 |
rOutAttrs.Put(SfxInt32Item(SCHATTR_AXIS_STEP_HELP, nStepHelp)); |
226 |
rOutAttrs.Put(SfxInt32Item(SCHATTR_AXIS_STEP_HELP, nStepHelp)); |
Lines 197-203
Link Here
|
197 |
return TRUE; |
232 |
return TRUE; |
198 |
} |
233 |
} |
199 |
|
234 |
|
200 |
void SchScaleYAxisTabPage::Reset(const SfxItemSet& rInAttrs) |
235 |
void ScaleTabPage::Reset(const SfxItemSet& rInAttrs) |
201 |
{ |
236 |
{ |
202 |
DBG_ASSERT( pNumFormatter, "No NumberFormatter available" ); |
237 |
DBG_ASSERT( pNumFormatter, "No NumberFormatter available" ); |
203 |
if(!pNumFormatter) |
238 |
if(!pNumFormatter) |
Lines 246-251
Link Here
|
246 |
aCbxAutoStepHelp.Check(((const SfxBoolItem*)pPoolItem)->GetValue()); |
281 |
aCbxAutoStepHelp.Check(((const SfxBoolItem*)pPoolItem)->GetValue()); |
247 |
if (rInAttrs.GetItemState(SCHATTR_AXIS_LOGARITHM,TRUE, &pPoolItem) == SFX_ITEM_SET) |
282 |
if (rInAttrs.GetItemState(SCHATTR_AXIS_LOGARITHM,TRUE, &pPoolItem) == SFX_ITEM_SET) |
248 |
aCbxLogarithm.Check(((const SfxBoolItem*)pPoolItem)->GetValue()); |
283 |
aCbxLogarithm.Check(((const SfxBoolItem*)pPoolItem)->GetValue()); |
|
|
284 |
if (rInAttrs.GetItemState(SCHATTR_AXIS_REVERSE,TRUE, &pPoolItem) == SFX_ITEM_SET) |
285 |
aCbxReverse.Check(((const SfxBoolItem*)pPoolItem)->GetValue()); |
249 |
if (rInAttrs.GetItemState(SCHATTR_AXIS_STEP_HELP,TRUE, &pPoolItem) == SFX_ITEM_SET) |
286 |
if (rInAttrs.GetItemState(SCHATTR_AXIS_STEP_HELP,TRUE, &pPoolItem) == SFX_ITEM_SET) |
250 |
{ |
287 |
{ |
251 |
nStepHelp = ((const SfxInt32Item*)pPoolItem)->GetValue(); |
288 |
nStepHelp = ((const SfxInt32Item*)pPoolItem)->GetValue(); |
Lines 266-272
Link Here
|
266 |
EnableValueHdl(&aCbxAutoOrigin); |
303 |
EnableValueHdl(&aCbxAutoOrigin); |
267 |
} |
304 |
} |
268 |
|
305 |
|
269 |
int SchScaleYAxisTabPage::DeactivatePage(SfxItemSet* pItemSet) |
306 |
int ScaleTabPage::DeactivatePage(SfxItemSet* pItemSet) |
270 |
{ |
307 |
{ |
271 |
if( !pNumFormatter ) |
308 |
if( !pNumFormatter ) |
272 |
{ |
309 |
{ |
Lines 363-369
Link Here
|
363 |
return LEAVE_PAGE; |
400 |
return LEAVE_PAGE; |
364 |
} |
401 |
} |
365 |
|
402 |
|
366 |
void SchScaleYAxisTabPage::SetNumFormatter( SvNumberFormatter* pFormatter ) |
403 |
void ScaleTabPage::SetNumFormatter( SvNumberFormatter* pFormatter ) |
367 |
{ |
404 |
{ |
368 |
pNumFormatter = pFormatter; |
405 |
pNumFormatter = pFormatter; |
369 |
aFmtFldMax.SetFormatter( pNumFormatter ); |
406 |
aFmtFldMax.SetFormatter( pNumFormatter ); |
Lines 373-379
Link Here
|
373 |
SetNumFormat(); |
410 |
SetNumFormat(); |
374 |
} |
411 |
} |
375 |
|
412 |
|
376 |
void SchScaleYAxisTabPage::SetNumFormat() |
413 |
void ScaleTabPage::SetNumFormat() |
377 |
{ |
414 |
{ |
378 |
const SfxPoolItem *pPoolItem = NULL; |
415 |
const SfxPoolItem *pPoolItem = NULL; |
379 |
|
416 |
|
Lines 415-421
Link Here
|
415 |
} |
452 |
} |
416 |
} |
453 |
} |
417 |
|
454 |
|
418 |
bool SchScaleYAxisTabPage::ShowWarning( USHORT nResIdMessage, Edit * pControl /* = NULL */ ) |
455 |
bool ScaleTabPage::ShowWarning( USHORT nResIdMessage, Edit * pControl /* = NULL */ ) |
419 |
{ |
456 |
{ |
420 |
if( nResIdMessage == 0 ) |
457 |
if( nResIdMessage == 0 ) |
421 |
return false; |
458 |
return false; |