View | Details | Raw Unified | Return to issue 24614
Collapse All | Expand All

(-)Orig/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx (+8 lines)
Lines 104-109 Link Here
104
    PROP_AXIS_AUTO_STEPMAIN,
104
    PROP_AXIS_AUTO_STEPMAIN,
105
    PROP_AXIS_AUTO_STEPHELP,
105
    PROP_AXIS_AUTO_STEPHELP,
106
    PROP_AXIS_LOGARITHMIC,
106
    PROP_AXIS_LOGARITHMIC,
107
    PROP_AXIS_REVERSEDIRECTION,
107
    PROP_AXIS_DISPLAY_LABELS,
108
    PROP_AXIS_DISPLAY_LABELS,
108
    PROP_AXIS_TEXT_ROTATION,
109
    PROP_AXIS_TEXT_ROTATION,
109
    PROP_AXIS_MARKS,
110
    PROP_AXIS_MARKS,
Lines 200-205 Link Here
200
                  | beans::PropertyAttribute::MAYBEDEFAULT ));
201
                  | beans::PropertyAttribute::MAYBEDEFAULT ));
201
202
202
    rOutProperties.push_back(
203
    rOutProperties.push_back(
204
        Property( C2U( "ReverseDirection" ),
205
                  PROP_AXIS_REVERSEDIRECTION,
206
                  ::getBooleanCppuType(),
207
                  beans::PropertyAttribute::BOUND
208
                  | beans::PropertyAttribute::MAYBEDEFAULT ));
209
210
    rOutProperties.push_back(
203
        Property( C2U( "DisplayLabels" ),
211
        Property( C2U( "DisplayLabels" ),
204
                  PROP_AXIS_DISPLAY_LABELS,
212
                  PROP_AXIS_DISPLAY_LABELS,
205
                  ::getBooleanCppuType(),
213
                  ::getBooleanCppuType(),
(-)Orig/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx (+39 lines)
Lines 50-55 Link Here
50
#ifndef _COM_SUN_STAR_CHART2_EXPLICITSCALEDATA_HPP_
50
#ifndef _COM_SUN_STAR_CHART2_EXPLICITSCALEDATA_HPP_
51
#include <com/sun/star/chart2/ExplicitScaleData.hpp>
51
#include <com/sun/star/chart2/ExplicitScaleData.hpp>
52
#endif
52
#endif
53
#ifndef _COM_SUN_STAR_CHART2_AXISORIENTATION_HPP_
54
#include <com/sun/star/chart2/AxisOrientation.hpp>
55
#endif
53
56
54
#ifndef _COM_SUN_STAR_LANG_XSERVICENAME_HPP_
57
#ifndef _COM_SUN_STAR_LANG_XSERVICENAME_HPP_
55
#include <com/sun/star/lang/XServiceName.hpp>
58
#include <com/sun/star/lang/XServiceName.hpp>
Lines 57-62 Link Here
57
60
58
using namespace ::com::sun::star;
61
using namespace ::com::sun::star;
59
using ::com::sun::star::uno::Any;
62
using ::com::sun::star::uno::Any;
63
using namespace ::com::sun::star::chart2;
60
using ::com::sun::star::uno::Reference;
64
using ::com::sun::star::uno::Reference;
61
using ::com::sun::star::uno::Sequence;
65
using ::com::sun::star::uno::Sequence;
62
using ::rtl::OUString;
66
using ::rtl::OUString;
Lines 108-113 Link Here
108
        case SCALE_PROP_LOGARITHMIC:
112
        case SCALE_PROP_LOGARITHMIC:
109
            m_aOuterName = C2U("Logarithmic");
113
            m_aOuterName = C2U("Logarithmic");
110
            break;
114
            break;
115
        case SCALE_PROP_REVERSEDIRECTION:
116
            m_aOuterName = C2U("ReverseDirection");
117
            break;
111
        default:
118
        default:
112
            OSL_ENSURE(false,"unknown scale property");
119
            OSL_ENSURE(false,"unknown scale property");
113
            break;
120
            break;
Lines 133-138 Link Here
133
    rList.push_back( new WrappedScaleProperty( SCALE_PROP_AUTO_STEPMAIN, spChart2ModelContact ) );
140
    rList.push_back( new WrappedScaleProperty( SCALE_PROP_AUTO_STEPMAIN, spChart2ModelContact ) );
134
    rList.push_back( new WrappedScaleProperty( SCALE_PROP_AUTO_STEPHELP, spChart2ModelContact ) );
141
    rList.push_back( new WrappedScaleProperty( SCALE_PROP_AUTO_STEPHELP, spChart2ModelContact ) );
135
    rList.push_back( new WrappedScaleProperty( SCALE_PROP_LOGARITHMIC, spChart2ModelContact ) );
142
    rList.push_back( new WrappedScaleProperty( SCALE_PROP_LOGARITHMIC, spChart2ModelContact ) );
143
    rList.push_back( new WrappedScaleProperty( SCALE_PROP_REVERSEDIRECTION, spChart2ModelContact ) );
136
}
144
}
137
145
138
void WrappedScaleProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& xInnerPropertySet ) const
146
void WrappedScaleProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& xInnerPropertySet ) const
Lines 284-289 Link Here
284
            }
292
            }
285
            break;
293
            break;
286
        }
294
        }
295
        case SCALE_PROP_REVERSEDIRECTION:
296
        {
297
            if( rOuterValue >>= bBool )
298
            {
299
                bool bWasReverse = false;  
300
                if ( AxisOrientation_REVERSE == aScaleData.Orientation )
301
                {
302
                    bWasReverse = true;
303
                }
304
305
                // safe comparison between sal_Bool and bool
306
                if( (!bBool) != (!bWasReverse) )
307
                {
308
                    if( bBool )
309
                    {
310
                        aScaleData.Orientation = AxisOrientation_REVERSE;
311
                    }
312
                    else
313
                    {
314
                        aScaleData.Orientation = AxisOrientation_MATHEMATICAL;
315
                    }
316
                    bSetScaleData = true;
317
                }
318
            }
319
            break;
320
        }
287
        default:
321
        default:
288
        {
322
        {
289
            OSL_ENSURE(false,"unknown scale property");
323
            OSL_ENSURE(false,"unknown scale property");
Lines 435-440 Link Here
435
                      C2U( "com.sun.star.chart2.LogarithmicScaling" )));
469
                      C2U( "com.sun.star.chart2.LogarithmicScaling" )));
436
            break;
470
            break;
437
        }
471
        }
472
        case SCALE_PROP_REVERSEDIRECTION:
473
        {
474
            aRet <<= static_cast< sal_Bool >( AxisOrientation_REVERSE == aScaleData.Orientation );
475
            break;
476
        }
438
        default:
477
        default:
439
        {
478
        {
440
            OSL_ENSURE(false,"unknown scale property");
479
            OSL_ENSURE(false,"unknown scale property");
(-)Orig/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.hxx (+1 lines)
Lines 63-68 Link Here
63
        , SCALE_PROP_AUTO_STEPMAIN
63
        , SCALE_PROP_AUTO_STEPMAIN
64
        , SCALE_PROP_AUTO_STEPHELP
64
        , SCALE_PROP_AUTO_STEPHELP
65
        , SCALE_PROP_LOGARITHMIC
65
        , SCALE_PROP_LOGARITHMIC
66
        , SCALE_PROP_REVERSEDIRECTION
66
    };
67
    };
67
68
68
public:
69
public:
(-)Orig/chart2/source/controller/dialogs/TabPages.hrc (-1 / +2 lines)
Lines 146-152 Link Here
146
146
147
#define FL_SEPARATOR					18
147
#define FL_SEPARATOR					18
148
148
149
//#define TP_SCALE_Y		  903
149
//#define TP_SCALE_Y  		   903
150
150
151
#define FL_SCALE_Y			1
151
#define FL_SCALE_Y			1
152
#define FL_TICKS			2
152
#define FL_TICKS			2
Lines 168-173 Link Here
168
#define CBX_HELPTICKS_INNER	8
168
#define CBX_HELPTICKS_INNER	8
169
#define CBX_TICKS_OUTER		9
169
#define CBX_TICKS_OUTER		9
170
#define CBX_HELPTICKS_OUTER	10
170
#define CBX_HELPTICKS_OUTER	10
171
#define CBX_REVERSE             11
171
172
172
#define EDT_STEP_MAIN		1
173
#define EDT_STEP_MAIN		1
173
#define EDT_MAX				2
174
#define EDT_MAX				2
(-)Orig/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx (-19 / +30 lines)
Lines 127-132 Link Here
127
        , m_eObjectType( ObjectIdentifier::getObjectType( m_aObjectCID ) )
127
        , m_eObjectType( ObjectIdentifier::getObjectType( m_aObjectCID ) )
128
        , m_bAffectsMultipleObjects(false)
128
        , m_bAffectsMultipleObjects(false)
129
        , m_aLocalizedName()
129
        , m_aLocalizedName()
130
        , m_nAxisType(0)
130
        , m_bHasGeometryProperties(false)
131
        , m_bHasGeometryProperties(false)
131
        , m_bHasStatisticProperties(false)
132
        , m_bHasStatisticProperties(false)
132
        , m_bHasRegressionProperties(false)
133
        , m_bHasRegressionProperties(false)
Lines 135-141 Link Here
135
        , m_bHasAreaProperties(false)
136
        , m_bHasAreaProperties(false)
136
        , m_bHasLineProperties(false)
137
        , m_bHasLineProperties(false)
137
        , m_bHasSymbolProperties(false)
138
        , m_bHasSymbolProperties(false)
138
        , m_bHasScaleProperties(false)
139
        , m_bCanAxisLabelsBeStaggered(false)
139
        , m_bCanAxisLabelsBeStaggered(false)
140
{
140
{
141
    rtl::OUString aParticleID = ObjectIdentifier::getParticleID( m_aObjectCID );
141
    rtl::OUString aParticleID = ObjectIdentifier::getParticleID( m_aObjectCID );
Lines 152-157 Link Here
152
{
152
{
153
    return m_aLocalizedName;
153
    return m_aLocalizedName;
154
}
154
}
155
sal_Int32 ObjectPropertiesDialogParameter::getAxisType() const
156
{
157
    return m_nAxisType;
158
}
155
159
156
void ObjectPropertiesDialogParameter::init( const uno::Reference< frame::XModel >& xChartModel )
160
void ObjectPropertiesDialogParameter::init( const uno::Reference< frame::XModel >& xChartModel )
157
{
161
{
Lines 176-193 Link Here
176
180
177
    if( OBJECTTYPE_AXIS == m_eObjectType )
181
    if( OBJECTTYPE_AXIS == m_eObjectType )
178
    {
182
    {
179
        //show scale properties only for a single axis not for multiselection
183
        if( !m_bAffectsMultipleObjects )
180
        m_bHasScaleProperties = !m_bAffectsMultipleObjects;
181
182
        //no scale page for category axis
183
        if( m_bHasScaleProperties )
184
        {
184
        {
185
            uno::Reference< XAxis > xAxis( ObjectIdentifier::getAxisForCID( m_aObjectCID, xChartModel ) );
185
            uno::Reference< XAxis > xAxis( ObjectIdentifier::getAxisForCID( m_aObjectCID, xChartModel ) );
186
            if( xAxis.is() )
186
            if( xAxis.is() )
187
            {
187
            {
188
                ScaleData aData( xAxis->getScaleData() );
188
                m_nAxisType = ( xAxis->getScaleData() ).AxisType;
189
                if( aData.AxisType == chart2::AxisType::CATEGORY || aData.AxisType == chart2::AxisType::SERIES )
190
                    m_bHasScaleProperties = false;
191
            }
189
            }
192
        }
190
        }
193
191
Lines 245-254 Link Here
245
{
243
{
246
    return m_bHasSymbolProperties;
244
    return m_bHasSymbolProperties;
247
}
245
}
248
bool ObjectPropertiesDialogParameter::HasScaleProperties() const
249
{
250
    return m_bHasScaleProperties;
251
}
252
bool ObjectPropertiesDialogParameter::CanAxisLabelsBeStaggered() const
246
bool ObjectPropertiesDialogParameter::CanAxisLabelsBeStaggered() const
253
{
247
{
254
    return m_bCanAxisLabelsBeStaggered;
248
    return m_bCanAxisLabelsBeStaggered;
Lines 337-347 Link Here
337
            AddTabPage(RID_SVXPAGE_LINE, String(SchResId(STR_PAGE_LINE)));
331
            AddTabPage(RID_SVXPAGE_LINE, String(SchResId(STR_PAGE_LINE)));
338
            AddTabPage(RID_SVXPAGE_CHAR_NAME, String(SchResId(STR_PAGE_CHARACTERS)));
332
            AddTabPage(RID_SVXPAGE_CHAR_NAME, String(SchResId(STR_PAGE_CHARACTERS)));
339
            AddTabPage(RID_SVXPAGE_CHAR_EFFECTS, String(SchResId(STR_PAGE_FONT_EFFECTS)));
333
            AddTabPage(RID_SVXPAGE_CHAR_EFFECTS, String(SchResId(STR_PAGE_FONT_EFFECTS)));
340
            AddTabPage(TP_AXIS_LABEL, String(SchResId(STR_OBJECT_LABEL)), SchAxisLabelTabPage::Create, NULL);
334
            AddTabPage(TP_AXIS_LABEL, String(SchResId(STR_OBJECT_LABEL)), SchAxisLabelTabPage::Create, NULL);          
341
            if( m_pParameter->HasScaleProperties() )
335
            switch ( m_pParameter->getAxisType() )
342
            {
336
            {
343
                AddTabPage(TP_SCALE_Y, String(SchResId(STR_PAGE_SCALE)), SchScaleYAxisTabPage::Create, NULL);
337
            case chart2::AxisType::REALNUMBER : 
344
                AddTabPage(RID_SVXPAGE_NUMBERFORMAT, String(SchResId(STR_PAGE_NUMBERS)));
338
                {
339
                    AddTabPage(TP_SCALE_Y, String(SchResId(STR_PAGE_SCALE)), ScaleTabPage::CreateValueScalePage, NULL);
340
                    AddTabPage(RID_SVXPAGE_NUMBERFORMAT, String(SchResId(STR_PAGE_NUMBERS)));
341
                }
342
                break;
343
            case chart2::AxisType::PERCENT :
344
                {
345
                    AddTabPage(TP_SCALE_Y, String(SchResId(STR_PAGE_SCALE)), ScaleTabPage::CreatePercentAxisScalePage, NULL);
346
                    AddTabPage(RID_SVXPAGE_NUMBERFORMAT, String(SchResId(STR_PAGE_NUMBERS)));
347
                }
348
                break;
349
            case chart2::AxisType::CATEGORY :
350
                {
351
                    AddTabPage(TP_SCALE_Y, String(SchResId(STR_PAGE_SCALE)), ScaleTabPage::CreateCategroyScalePage, NULL);
352
                }
353
                break;
354
            case chart2::AxisType::SERIES :
355
                break;
345
            }
356
            }
346
            break;
357
            break;
347
        }
358
        }
Lines 359-365 Link Here
359
            AddTabPage(RID_SVXPAGE_LINE, String(SchResId(STR_PAGE_LINE)));
370
            AddTabPage(RID_SVXPAGE_LINE, String(SchResId(STR_PAGE_LINE)));
360
            AddTabPage(RID_SVXPAGE_CHAR_NAME, String(SchResId(STR_PAGE_CHARACTERS)), SvxCharNamePage::Create, NULL);
371
            AddTabPage(RID_SVXPAGE_CHAR_NAME, String(SchResId(STR_PAGE_CHARACTERS)), SvxCharNamePage::Create, NULL);
361
            AddTabPage(RID_SVXPAGE_CHAR_EFFECTS, String(SchResId(STR_PAGE_FONT_EFFECTS)), SvxCharEffectsPage::Create, NULL);
372
            AddTabPage(RID_SVXPAGE_CHAR_EFFECTS, String(SchResId(STR_PAGE_FONT_EFFECTS)), SvxCharEffectsPage::Create, NULL);
362
            AddTabPage(TP_SCALE_Y, String(SchResId(STR_PAGE_SCALE)), SchScaleYAxisTabPage::Create, NULL);
373
            AddTabPage(TP_SCALE_Y, String(SchResId(STR_PAGE_SCALE)), ScaleTabPage::Create, NULL);
363
            AddTabPage(RID_SVXPAGE_NUMBERFORMAT, String(SchResId(STR_PAGE_NUMBERS)), SvxNumberFormatTabPage::Create, NULL);
374
            AddTabPage(RID_SVXPAGE_NUMBERFORMAT, String(SchResId(STR_PAGE_NUMBERS)), SvxNumberFormatTabPage::Create, NULL);
364
            AddTabPage(TP_AXIS_LABEL, String(SchResId(STR_OBJECT_LABEL)), SchAxisLabelTabPage::Create, NULL);
375
            AddTabPage(TP_AXIS_LABEL, String(SchResId(STR_OBJECT_LABEL)), SchAxisLabelTabPage::Create, NULL);
365
////            ((SfxItemSet * const) pAttr)->ClearItem (SCHATTR_AXISTYPE);
376
////            ((SfxItemSet * const) pAttr)->ClearItem (SCHATTR_AXISTYPE);
Lines 485-491 Link Here
485
496
486
        case TP_SCALE_Y:
497
        case TP_SCALE_Y:
487
            {
498
            {
488
                SchScaleYAxisTabPage & rAxisTabPage = static_cast< SchScaleYAxisTabPage & >( rPage );
499
                ScaleTabPage & rAxisTabPage = static_cast< ScaleTabPage & >( rPage );
489
500
490
                static SvNumberFormatter aNumberFormatter = SvNumberFormatter( LANGUAGE_SYSTEM );
501
                static SvNumberFormatter aNumberFormatter = SvNumberFormatter( LANGUAGE_SYSTEM );
491
502
(-)Orig/chart2/source/controller/dialogs/tp_Scale.cxx (-15 / +52 lines)
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;
(-)Orig/chart2/source/controller/dialogs/tp_Scale.hxx (-3 / +24 lines)
Lines 62-68 Link Here
62
{
62
{
63
//.............................................................................
63
//.............................................................................
64
64
65
class SchScaleYAxisTabPage : public SfxTabPage
65
class ScaleTabPage : public SfxTabPage
66
{
66
{
67
private:
67
private:
68
	FixedLine			aFlScale;
68
	FixedLine			aFlScale;
Lines 87-92 Link Here
87
	FormattedField		aFmtFldOrigin;
87
	FormattedField		aFmtFldOrigin;
88
	CheckBox			aCbxAutoOrigin;
88
	CheckBox			aCbxAutoOrigin;
89
	CheckBox			aCbxLogarithm;
89
	CheckBox			aCbxLogarithm;
90
    CheckBox                           aCbxReverse;
90
91
91
	FixedLine aFlTicks;
92
	FixedLine aFlTicks;
92
	CheckBox aCbxTicksInner;
93
	CheckBox aCbxTicksInner;
Lines 104-109 Link Here
104
	int                 nAxisType;
105
	int                 nAxisType;
105
	SvNumberFormatter*	pNumFormatter;
106
	SvNumberFormatter*	pNumFormatter;
106
107
108
    enum ScalePageType
109
    {
110
        /** scale page for the value axis
111
         */
112
        ValueScalePage = 0, 
113
        /** scale page for the percent axis
114
         */
115
        PercentScalePage = 1,
116
        /** scale page for the category axis
117
         */
118
        CategroyScalePage = 2,
119
        /** scale page for the series names (z axis)
120
         */
121
        SeriesScalePage = 3,
122
    };
123
124
    void EnableControls( const ScalePageType& rScalePageType );
125
107
	DECL_LINK( EnableValueHdl, CheckBox* );
126
	DECL_LINK( EnableValueHdl, CheckBox* );
108
127
109
    /** shows a warning window due to an invalid input.
128
    /** shows a warning window due to an invalid input.
Lines 122-130 Link Here
122
    bool ShowWarning( USHORT nResIdMessage, Edit * pControl = NULL );
141
    bool ShowWarning( USHORT nResIdMessage, Edit * pControl = NULL );
123
142
124
public:
143
public:
125
	SchScaleYAxisTabPage( Window* pParent, const SfxItemSet& rInAttrs );
144
	ScaleTabPage( Window* pParent, const SfxItemSet& rInAttrs, const ScalePageType& rScalePageType );
126
145
127
	static SfxTabPage* Create( Window* pParent, const SfxItemSet& rInAttrs );
146
    static SfxTabPage* CreateValueScalePage( Window* pParent, const SfxItemSet& rInAttrs );
147
    static SfxTabPage* CreateCategroyScalePage( Window* pParent, const SfxItemSet& rInAttrs );
148
    static SfxTabPage* CreatePercentAxisScalePage( Window* pParent, const SfxItemSet& rInAttrs );
128
	virtual BOOL FillItemSet( SfxItemSet& rOutAttrs );
149
	virtual BOOL FillItemSet( SfxItemSet& rOutAttrs );
129
	virtual void Reset( const SfxItemSet& rInAttrs );
150
	virtual void Reset( const SfxItemSet& rInAttrs );
130
	virtual int DeactivatePage( SfxItemSet* pItemSet = NULL );
151
	virtual int DeactivatePage( SfxItemSet* pItemSet = NULL );
(-)Orig/chart2/source/controller/dialogs/tp_Scale.src (-3 / +11 lines)
Lines 168-177 Link Here
168
		CheckBox CBX_LOGARITHM
168
		CheckBox CBX_LOGARITHM
169
		{
169
		{
170
			Pos = MAP_APPFONT ( 11 , 97  ) ;
170
			Pos = MAP_APPFONT ( 11 , 97  ) ;
171
			Size = MAP_APPFONT ( 236 , 10 ) ;
171
			Size = MAP_APPFONT ( 78 , 10 ) ;
172
			TabStop = TRUE ;
172
			TabStop = TRUE ;
173
			Text [ en-US ] = "~Logarithmic scale" ;
173
			Text [ en-US ] = "~Logarithmic scale" ;
174
	};
174
	};
175
	
176
        CheckBox CBX_REVERSE
177
        {
178
                Pos = MAP_APPFONT ( 103 , 97  ) ;
179
                Size = MAP_APPFONT ( 78 , 10 ) ;
180
                TabStop = TRUE ;
181
                Text [ en-US ] = "Reverse ~direction" ;
182
        };
175
183
176
	FixedLine FL_TICKS
184
	FixedLine FL_TICKS
177
	{
185
	{
Lines 188-194 Link Here
188
	};
196
	};
189
		CheckBox CBX_TICKS_OUTER
197
		CheckBox CBX_TICKS_OUTER
190
		{
198
		{
191
			Pos = MAP_APPFONT ( 93 , 127  ) ;
199
			Pos = MAP_APPFONT ( 103 , 127  ) ;
192
			Size = MAP_APPFONT ( 78 , 10 ) ;
200
			Size = MAP_APPFONT ( 78 , 10 ) ;
193
			Text [ en-US ] = "~Outer";
201
			Text [ en-US ] = "~Outer";
194
	};
202
	};
Lines 208-214 Link Here
208
	};
216
	};
209
		CheckBox CBX_HELPTICKS_OUTER
217
		CheckBox CBX_HELPTICKS_OUTER
210
		{
218
		{
211
			Pos = MAP_APPFONT ( 93 , 160  ) ;
219
			Pos = MAP_APPFONT ( 103 , 160  ) ;
212
			Size = MAP_APPFONT ( 78 , 10 ) ;
220
			Size = MAP_APPFONT ( 78 , 10 ) ;
213
			Text [ en-US ] = "Out~er";
221
			Text [ en-US ] = "Out~er";
214
	};
222
	};
(-)Orig/chart2/source/controller/inc/dlg_ObjectProperties.hxx (-4 / +5 lines)
Lines 60-68 Link Here
60
    ObjectPropertiesDialogParameter( const rtl::OUString& rObjectCID );
60
    ObjectPropertiesDialogParameter( const rtl::OUString& rObjectCID );
61
    virtual ~ObjectPropertiesDialogParameter();
61
    virtual ~ObjectPropertiesDialogParameter();
62
62
63
	void	    	init( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel );
63
	void	        init( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel );
64
	ObjectType	    getObjectType() const;
64
	ObjectType	    getObjectType() const;
65
    rtl::OUString   getLocalizedName() const;
65
    rtl::OUString   getLocalizedName() const;
66
    sal_Int32       getAxisType() const;
66
67
67
	bool HasGeometryProperties() const;
68
	bool HasGeometryProperties() const;
68
	bool HasStatisticProperties() const;
69
	bool HasStatisticProperties() const;
Lines 72-78 Link Here
72
	bool HasAreaProperties() const;
73
	bool HasAreaProperties() const;
73
	bool HasLineProperties() const;
74
	bool HasLineProperties() const;
74
	bool HasSymbolProperties() const;
75
	bool HasSymbolProperties() const;
75
	bool HasScaleProperties() const;
76
	bool CanAxisLabelsBeStaggered() const;
76
	bool CanAxisLabelsBeStaggered() const;
77
77
78
private:
78
private:
Lines 80-86 Link Here
80
	ObjectType		m_eObjectType;
80
	ObjectType		m_eObjectType;
81
    bool m_bAffectsMultipleObjects;//is true if more than one object of the given type will be changed (e.g. all axes or all titles)
81
    bool m_bAffectsMultipleObjects;//is true if more than one object of the given type will be changed (e.g. all axes or all titles)
82
82
83
    rtl::OUString	m_aLocalizedName;
83
    rtl::OUString	m_aLocalizedName; 
84
85
    sal_Int32          m_nAxisType;
84
86
85
	bool m_bHasGeometryProperties;
87
	bool m_bHasGeometryProperties;
86
	bool m_bHasStatisticProperties;
88
	bool m_bHasStatisticProperties;
Lines 90-96 Link Here
90
	bool m_bHasAreaProperties;
92
	bool m_bHasAreaProperties;
91
	bool m_bHasLineProperties;
93
	bool m_bHasLineProperties;
92
	bool m_bHasSymbolProperties;
94
	bool m_bHasSymbolProperties;
93
	bool m_bHasScaleProperties;
94
	bool m_bCanAxisLabelsBeStaggered;
95
	bool m_bCanAxisLabelsBeStaggered;
95
};
96
};
96
97
(-)Orig/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx (+43 lines)
Lines 54-59 Link Here
54
#ifndef _COM_SUN_STAR_CHART2_XAXIS_HPP_
54
#ifndef _COM_SUN_STAR_CHART2_XAXIS_HPP_
55
#include <com/sun/star/chart2/XAxis.hpp>
55
#include <com/sun/star/chart2/XAxis.hpp>
56
#endif
56
#endif
57
#ifndef _COM_SUN_STAR_CHART2_AXISORIENTATION_HPP_
58
#include <com/sun/star/chart2/AxisOrientation.hpp>
59
#endif
57
60
58
// #ifndef _COMPHELPER_PROCESSFACTORY_HXX_
61
// #ifndef _COMPHELPER_PROCESSFACTORY_HXX_
59
// #include <comphelper/processfactory.hxx>
62
// #include <comphelper/processfactory.hxx>
Lines 253-258 Link Here
253
        }
256
        }
254
        break;
257
        break;
255
258
259
        case SCHATTR_AXIS_REVERSE:
260
        {
261
            bool bWasReverse = false; 
262
            if ( AxisOrientation_REVERSE == aScale.Orientation )
263
            {
264
                bWasReverse = true;
265
            }
266
            rOutItemSet.Put( SfxBoolItem( nWhichId, bWasReverse ));
267
        }
268
        break;
269
256
        // Increment
270
        // Increment
257
        case SCHATTR_AXIS_AUTO_STEP_MAIN:
271
        case SCHATTR_AXIS_AUTO_STEP_MAIN:
258
            // if the any has no value => auto is on
272
            // if the any has no value => auto is on
Lines 467-472 Link Here
467
        }
481
        }
468
        break;
482
        break;
469
483
484
        case SCHATTR_AXIS_REVERSE:
485
        {
486
            bool bWasReverse = false;  
487
            if ( AxisOrientation_REVERSE == aScale.Orientation )
488
            {
489
                bWasReverse = true;
490
            }
491
            if( (reinterpret_cast< const SfxBoolItem & >(
492
                     rItemSet.Get( nWhichId )).GetValue() ))
493
            {
494
                // reverse is ture
495
                if ( !bWasReverse )
496
                {
497
                    aScale.Orientation = AxisOrientation_REVERSE;
498
                    bSetScale = true;
499
                }
500
            }
501
            else
502
            {
503
                // reverse is false => MATHEMATICAL
504
                if ( bWasReverse )
505
                {
506
                    aScale.Orientation = AxisOrientation_MATHEMATICAL;
507
                    bSetScale = true;
508
                }
509
            }
510
        }
511
        break;
512
470
        // Increment
513
        // Increment
471
        case SCHATTR_AXIS_AUTO_STEP_MAIN:
514
        case SCHATTR_AXIS_AUTO_STEP_MAIN:
472
            if( (reinterpret_cast< const SfxBoolItem & >(
515
            if( (reinterpret_cast< const SfxBoolItem & >(
(-)Orig/chart2/source/inc/chartview/ChartSfxItemIds.hxx (-1 / +1 lines)
Lines 189-196 Link Here
189
#define SCHATTR_AXIS_SHOWHELPGRID		(SCHATTR_AXIS_START + 17)//87
189
#define SCHATTR_AXIS_SHOWHELPGRID		(SCHATTR_AXIS_START + 17)//87
190
#define SCHATTR_AXIS_TOPDOWN			(SCHATTR_AXIS_START + 18)//88
190
#define SCHATTR_AXIS_TOPDOWN			(SCHATTR_AXIS_START + 18)//88
191
#define SCHATTR_AXIS_HELPTICKS			(SCHATTR_AXIS_START + 19)//89
191
#define SCHATTR_AXIS_HELPTICKS			(SCHATTR_AXIS_START + 19)//89
192
#define SCHATTR_AXIS_REVERSE			(SCHATTR_AXIS_START + 20)//90
192
193
193
#define SCHATTR_AXIS_DUMMY0				(SCHATTR_AXIS_START + 20)//90
194
#define SCHATTR_AXIS_DUMMY1				(SCHATTR_AXIS_START + 21)//91
194
#define SCHATTR_AXIS_DUMMY1				(SCHATTR_AXIS_START + 21)//91
195
#define SCHATTR_AXIS_DUMMY2				(SCHATTR_AXIS_START + 22)//92
195
#define SCHATTR_AXIS_DUMMY2				(SCHATTR_AXIS_START + 22)//92
196
#define SCHATTR_AXIS_DUMMY3				(SCHATTR_AXIS_START + 23)//93
196
#define SCHATTR_AXIS_DUMMY3				(SCHATTR_AXIS_START + 23)//93
(-)Orig/chart2/source/view/main/ChartItemPool.cxx (-3 / +3 lines)
Lines 196-203 Link Here
196
	ppPoolDefaults[SCHATTR_AXIS_SHOWMAINGRID	- SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_SHOWMAINGRID,0);
196
	ppPoolDefaults[SCHATTR_AXIS_SHOWMAINGRID	- SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_SHOWMAINGRID,0);
197
	ppPoolDefaults[SCHATTR_AXIS_SHOWHELPGRID	- SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_SHOWHELPGRID,0);
197
	ppPoolDefaults[SCHATTR_AXIS_SHOWHELPGRID	- SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_SHOWHELPGRID,0);
198
	ppPoolDefaults[SCHATTR_AXIS_TOPDOWN			- SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_TOPDOWN,0);
198
	ppPoolDefaults[SCHATTR_AXIS_TOPDOWN			- SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_TOPDOWN,0);
199
    ppPoolDefaults[SCHATTR_AXIS_REVERSE			- SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_REVERSE,0);
199
200
200
	ppPoolDefaults[SCHATTR_AXIS_DUMMY0			- SCHATTR_START] = new SfxInt32Item(SCHATTR_AXIS_DUMMY0,0);
201
	ppPoolDefaults[SCHATTR_AXIS_DUMMY1			- SCHATTR_START] = new SfxInt32Item(SCHATTR_AXIS_DUMMY1,0);
201
	ppPoolDefaults[SCHATTR_AXIS_DUMMY1			- SCHATTR_START] = new SfxInt32Item(SCHATTR_AXIS_DUMMY1,0);
202
	ppPoolDefaults[SCHATTR_AXIS_DUMMY2			- SCHATTR_START] = new SfxInt32Item(SCHATTR_AXIS_DUMMY2,0);
202
	ppPoolDefaults[SCHATTR_AXIS_DUMMY2			- SCHATTR_START] = new SfxInt32Item(SCHATTR_AXIS_DUMMY2,0);
203
	ppPoolDefaults[SCHATTR_AXIS_DUMMY3			- SCHATTR_START] = new SfxInt32Item(SCHATTR_AXIS_DUMMY3,0);
203
	ppPoolDefaults[SCHATTR_AXIS_DUMMY3			- SCHATTR_START] = new SfxInt32Item(SCHATTR_AXIS_DUMMY3,0);
Lines 446-454 Link Here
446
	delete  ppPoolDefaults[SCHATTR_AXIS_SHOWHELPGRID	- SCHATTR_START];
446
	delete  ppPoolDefaults[SCHATTR_AXIS_SHOWHELPGRID	- SCHATTR_START];
447
	SetRefCount(*ppPoolDefaults[SCHATTR_AXIS_TOPDOWN			- SCHATTR_START], 0);
447
	SetRefCount(*ppPoolDefaults[SCHATTR_AXIS_TOPDOWN			- SCHATTR_START], 0);
448
	delete  ppPoolDefaults[SCHATTR_AXIS_TOPDOWN			- SCHATTR_START];
448
	delete  ppPoolDefaults[SCHATTR_AXIS_TOPDOWN			- SCHATTR_START];
449
    SetRefCount(*ppPoolDefaults[SCHATTR_AXIS_REVERSE		- SCHATTR_START], 0);
450
    delete  ppPoolDefaults[SCHATTR_AXIS_REVERSE			- SCHATTR_START];
449
451
450
	SetRefCount(*ppPoolDefaults[SCHATTR_AXIS_DUMMY0			- SCHATTR_START], 0);
451
	delete  ppPoolDefaults[SCHATTR_AXIS_DUMMY0			- SCHATTR_START];
452
	SetRefCount(*ppPoolDefaults[SCHATTR_AXIS_DUMMY1			- SCHATTR_START], 0);
452
	SetRefCount(*ppPoolDefaults[SCHATTR_AXIS_DUMMY1			- SCHATTR_START], 0);
453
	delete  ppPoolDefaults[SCHATTR_AXIS_DUMMY1			- SCHATTR_START];
453
	delete  ppPoolDefaults[SCHATTR_AXIS_DUMMY1			- SCHATTR_START];
454
	SetRefCount(*ppPoolDefaults[SCHATTR_AXIS_DUMMY2			- SCHATTR_START], 0);
454
	SetRefCount(*ppPoolDefaults[SCHATTR_AXIS_DUMMY2			- SCHATTR_START], 0);
(-)Orig/sc/source/filter/excel/xechart.cxx (-4 lines)
Lines 2061-2074 Link Here
2061
    if( !lclIsAutoAnyOrGetValue( fOrigin, rScaleData.Origin ) )
2061
    if( !lclIsAutoAnyOrGetValue( fOrigin, rScaleData.Origin ) )
2062
        maData.mnCross = limit_cast< sal_uInt16 >( fOrigin, 1, 32767 );
2062
        maData.mnCross = limit_cast< sal_uInt16 >( fOrigin, 1, 32767 );
2063
2063
2064
#if EXC_CHART2_REVERSE_AXIS
2065
    // reverse order
2064
    // reverse order
2066
    if( rScaleData.Orientation == ::com::sun::star::chart2::AxisOrientation_REVERSE )
2065
    if( rScaleData.Orientation == ::com::sun::star::chart2::AxisOrientation_REVERSE )
2067
    {
2066
    {
2068
        ::set_flag( maData.mnFlags, EXC_CHLABELRANGE_REVERSE );
2067
        ::set_flag( maData.mnFlags, EXC_CHLABELRANGE_REVERSE );
2069
        SwapAxisMaxCross();
2068
        SwapAxisMaxCross();
2070
    }
2069
    }
2071
#endif
2072
}
2070
}
2073
2071
2074
void XclExpChLabelRange::WriteBody( XclExpStream& rStrm )
2072
void XclExpChLabelRange::WriteBody( XclExpStream& rStrm )
Lines 2116-2126 Link Here
2116
        maData.mfMinorStep = maData.mfMajorStep / nCount;
2114
        maData.mfMinorStep = maData.mfMajorStep / nCount;
2117
    ::set_flag( maData.mnFlags, EXC_CHVALUERANGE_AUTOMINOR, bAutoMinor );
2115
    ::set_flag( maData.mnFlags, EXC_CHVALUERANGE_AUTOMINOR, bAutoMinor );
2118
2116
2119
#if EXC_CHART2_REVERSE_AXIS
2120
    // reverse order
2117
    // reverse order
2121
    namespace cssc = ::com::sun::star::chart2;
2118
    namespace cssc = ::com::sun::star::chart2;
2122
    ::set_flag( maData.mnFlags, EXC_CHVALUERANGE_REVERSE, rScaleData.Orientation == cssc::AxisOrientation_REVERSE );
2119
    ::set_flag( maData.mnFlags, EXC_CHVALUERANGE_REVERSE, rScaleData.Orientation == cssc::AxisOrientation_REVERSE );
2123
#endif
2124
}
2120
}
2125
2121
2126
void XclExpChValueRange::WriteBody( XclExpStream& rStrm )
2122
void XclExpChValueRange::WriteBody( XclExpStream& rStrm )
(-)Orig/sc/source/filter/excel/xichart.cxx (-4 lines)
Lines 2379-2389 Link Here
2379
    bool bMaxCross = ::get_flag( maData.mnFlags, EXC_CHLABELRANGE_MAXCROSS );
2379
    bool bMaxCross = ::get_flag( maData.mnFlags, EXC_CHLABELRANGE_MAXCROSS );
2380
    lclSetValueOrClearAny( rScaleData.Origin, static_cast< double >( maData.mnCross ), bMaxCross );
2380
    lclSetValueOrClearAny( rScaleData.Origin, static_cast< double >( maData.mnCross ), bMaxCross );
2381
2381
2382
#if EXC_CHART2_REVERSE_AXIS
2383
    // reverse order
2382
    // reverse order
2384
    bool bReverse = ::get_flag( maData.mnFlags, EXC_CHLABELRANGE_REVERSE );
2383
    bool bReverse = ::get_flag( maData.mnFlags, EXC_CHLABELRANGE_REVERSE );
2385
    rScaleData.Orientation = bReverse ? cssc::AxisOrientation_REVERSE : cssc::AxisOrientation_MATHEMATICAL;
2384
    rScaleData.Orientation = bReverse ? cssc::AxisOrientation_REVERSE : cssc::AxisOrientation_MATHEMATICAL;
2386
#endif
2387
2385
2388
    //! TODO #i58731# show n-th category
2386
    //! TODO #i58731# show n-th category
2389
}
2387
}
Lines 2445-2456 Link Here
2445
    }
2443
    }
2446
    lclSetValueOrClearAny( rSubIncrementSeq[ 0 ].IntervalCount, nCount, nCount == 0 );
2444
    lclSetValueOrClearAny( rSubIncrementSeq[ 0 ].IntervalCount, nCount, nCount == 0 );
2447
2445
2448
#if EXC_CHART2_REVERSE_AXIS
2449
    // reverse order
2446
    // reverse order
2450
    namespace cssc = ::com::sun::star::chart2;
2447
    namespace cssc = ::com::sun::star::chart2;
2451
    bool bReverse = ::get_flag( maData.mnFlags, EXC_CHVALUERANGE_REVERSE );
2448
    bool bReverse = ::get_flag( maData.mnFlags, EXC_CHVALUERANGE_REVERSE );
2452
    rScaleData.Orientation = bReverse ? cssc::AxisOrientation_REVERSE : cssc::AxisOrientation_MATHEMATICAL;
2449
    rScaleData.Orientation = bReverse ? cssc::AxisOrientation_REVERSE : cssc::AxisOrientation_MATHEMATICAL;
2453
#endif
2454
}
2450
}
2455
2451
2456
// ----------------------------------------------------------------------------
2452
// ----------------------------------------------------------------------------
(-)Orig/sc/source/filter/inc/xlchart.hxx (-2 lines)
Lines 36-43 Link Here
36
#ifndef SC_XLCHART_HXX
36
#ifndef SC_XLCHART_HXX
37
#define SC_XLCHART_HXX
37
#define SC_XLCHART_HXX
38
38
39
// disable/enable support for reversed axes
40
#define EXC_CHART2_REVERSE_AXIS 0
41
// disable/enable support for varied point colors property
39
// disable/enable support for varied point colors property
42
#define EXC_CHART2_VARYCOLORSBY_PROP 0
40
#define EXC_CHART2_VARYCOLORSBY_PROP 0
43
41
(-)Orig/xmloff/inc/xmloff/xmltoken.hxx (-1 / +2 lines)
Lines 2035-2041 Link Here
2035
		XML_UNCOVER_TO_UPPERLEFT,
2035
		XML_UNCOVER_TO_UPPERLEFT,
2036
		XML_UNCOVER_TO_TOP,
2036
		XML_UNCOVER_TO_TOP,
2037
		XML_UNCOVER_TO_UPPERRIGHT,
2037
		XML_UNCOVER_TO_UPPERRIGHT,
2038
		XML_UNCOVER_TO_RIGHT,
2038
 		XML_UNCOVER_TO_RIGHT,
2039
		XML_UNCOVER_TO_LOWERRIGHT,
2039
		XML_UNCOVER_TO_LOWERRIGHT,
2040
		XML_UNCOVER_TO_BOTTOM,
2040
		XML_UNCOVER_TO_BOTTOM,
2041
		XML_UNCOVER_TO_LOWERLEFT,
2041
		XML_UNCOVER_TO_LOWERLEFT,
Lines 2048-2053 Link Here
2048
        XML_APPLICATION,
2048
        XML_APPLICATION,
2049
        XML_SYMBOL_IMAGE,
2049
        XML_SYMBOL_IMAGE,
2050
        XML_TEXT_OVERLAP,
2050
        XML_TEXT_OVERLAP,
2051
        XML_REVERSE_DIRECTION,
2051
        XML_SPLINE_ORDER,
2052
        XML_SPLINE_ORDER,
2052
        XML_SPLINE_RESOLUTION,
2053
        XML_SPLINE_RESOLUTION,
2053
2054
(-)Orig/xmloff/source/chart/PropertyMap.hxx (+1 lines)
Lines 177-182 Link Here
177
	MAP_ENTRY( "GapWidth", CHART, XML_GAP_WIDTH, XML_TYPE_NUMBER ),
177
	MAP_ENTRY( "GapWidth", CHART, XML_GAP_WIDTH, XML_TYPE_NUMBER ),
178
	MAP_ENTRY( "Overlap", CHART, XML_OVERLAP, XML_TYPE_NUMBER ),
178
	MAP_ENTRY( "Overlap", CHART, XML_OVERLAP, XML_TYPE_NUMBER ),
179
    MAP_ENTRY( "TextCanOverlap", CHART, XML_TEXT_OVERLAP, XML_TYPE_BOOL ),
179
    MAP_ENTRY( "TextCanOverlap", CHART, XML_TEXT_OVERLAP, XML_TYPE_BOOL ),
180
    MAP_ENTRY( "ReverseDirection", CHART, XML_REVERSE_DIRECTION, XML_TYPE_BOOL ),
180
	MAP_ENTRY( "TextBreak", TEXT, XML_LINE_BREAK, XML_TYPE_BOOL ),
181
	MAP_ENTRY( "TextBreak", TEXT, XML_LINE_BREAK, XML_TYPE_BOOL ),
181
	MAP_ENTRY( "ArrangeOrder", CHART, XML_LABEL_ARRANGEMENT, XML_SCH_TYPE_AXIS_ARRANGEMENT ),
182
	MAP_ENTRY( "ArrangeOrder", CHART, XML_LABEL_ARRANGEMENT, XML_SCH_TYPE_AXIS_ARRANGEMENT ),
182
	MAP_SPECIAL( "NumberFormat", STYLE, XML_DATA_STYLE_NAME, XML_TYPE_NUMBER, NUMBER_FORMAT ),
183
	MAP_SPECIAL( "NumberFormat", STYLE, XML_DATA_STYLE_NAME, XML_TYPE_NUMBER, NUMBER_FORMAT ),
(-)Orig/xmloff/source/core/xmltoken.cxx (+1 lines)
Lines 2059-2064 Link Here
2059
2059
2060
        TOKEN( "symbol-image",                    XML_SYMBOL_IMAGE ),
2060
        TOKEN( "symbol-image",                    XML_SYMBOL_IMAGE ),
2061
        TOKEN( "text-overlap",                    XML_TEXT_OVERLAP ),
2061
        TOKEN( "text-overlap",                    XML_TEXT_OVERLAP ),
2062
        TOKEN( "reverse-direction",               XML_REVERSE_DIRECTION ),
2062
        TOKEN( "spline-order",                    XML_SPLINE_ORDER ),
2063
        TOKEN( "spline-order",                    XML_SPLINE_ORDER ),
2063
        TOKEN( "spline-resolution",               XML_SPLINE_RESOLUTION ),
2064
        TOKEN( "spline-resolution",               XML_SPLINE_RESOLUTION ),
2064
        TOKEN( "paper-tray-name",                 XML_PAPER_TRAY_NAME ),
2065
        TOKEN( "paper-tray-name",                 XML_PAPER_TRAY_NAME ),

Return to issue 24614