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

(-)sc/source/filter/excel/xichart.cxx (+1 lines)
Lines 2401-2406 Link Here
2401
    }
2401
    }
2402
2402
2403
    // properties
2403
    // properties
2404
    rPropSet.SetProperty( EXC_CHPROP_3DRELATIVEHEIGHT, (sal_Int32)(maData.mnRelHeight / 2)); // seems to be 200%, cange to 100%
2404
    rPropSet.SetProperty( EXC_CHPROP_ROTATIONVERTICAL, nRotationY );
2405
    rPropSet.SetProperty( EXC_CHPROP_ROTATIONVERTICAL, nRotationY );
2405
    rPropSet.SetProperty( EXC_CHPROP_ROTATIONHORIZONTAL, nRotationX );
2406
    rPropSet.SetProperty( EXC_CHPROP_ROTATIONHORIZONTAL, nRotationX );
2406
    rPropSet.SetProperty( EXC_CHPROP_PERSPECTIVE, nPerspective );
2407
    rPropSet.SetProperty( EXC_CHPROP_PERSPECTIVE, nPerspective );
(-)sc/source/filter/inc/xlchart.hxx (+1 lines)
Lines 127-132 Link Here
127
#define EXC_CHPROP_ROLE                     CREATE_OUSTRING( "Role" )
127
#define EXC_CHPROP_ROLE                     CREATE_OUSTRING( "Role" )
128
#define EXC_CHPROP_ROTATIONHORIZONTAL       CREATE_OUSTRING( "RotationHorizontal" )
128
#define EXC_CHPROP_ROTATIONHORIZONTAL       CREATE_OUSTRING( "RotationHorizontal" )
129
#define EXC_CHPROP_ROTATIONVERTICAL         CREATE_OUSTRING( "RotationVertical" )
129
#define EXC_CHPROP_ROTATIONVERTICAL         CREATE_OUSTRING( "RotationVertical" )
130
#define EXC_CHPROP_3DRELATIVEHEIGHT         CREATE_OUSTRING( "3DRelativeHeight" )
130
#define EXC_CHPROP_SHOW                     CREATE_OUSTRING( "Show" )
131
#define EXC_CHPROP_SHOW                     CREATE_OUSTRING( "Show" )
131
#define EXC_CHPROP_SHOWCORRELATION          CREATE_OUSTRING( "ShowCorrelationCoefficient" )
132
#define EXC_CHPROP_SHOWCORRELATION          CREATE_OUSTRING( "ShowCorrelationCoefficient" )
132
#define EXC_CHPROP_SHOWEQUATION             CREATE_OUSTRING( "ShowEquation" )
133
#define EXC_CHPROP_SHOWEQUATION             CREATE_OUSTRING( "ShowEquation" )
(-)chart2/source/model/main/Diagram.cxx (-2 / +9 lines)
Lines 79-85 Link Here
79
    PROP_DIAGRAM_PERSPECTIVE,
79
    PROP_DIAGRAM_PERSPECTIVE,
80
    PROP_DIAGRAM_ROTATION_HORIZONTAL,
80
    PROP_DIAGRAM_ROTATION_HORIZONTAL,
81
    PROP_DIAGRAM_ROTATION_VERTICAL,
81
    PROP_DIAGRAM_ROTATION_VERTICAL,
82
    PROP_DIAGRAM_MISSING_VALUE_TREATMENT
82
    PROP_DIAGRAM_MISSING_VALUE_TREATMENT,
83
    PROP_DIAGRAM_3DRELATIVEHEIGHT
83
};
84
};
84
85
85
void lcl_AddPropertiesToVector(
86
void lcl_AddPropertiesToVector(
Lines 172-177 Link Here
172
                  ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)),
173
                  ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)),
173
                  beans::PropertyAttribute::BOUND
174
                  beans::PropertyAttribute::BOUND
174
                  | beans::PropertyAttribute::MAYBEVOID ));
175
                  | beans::PropertyAttribute::MAYBEVOID ));
176
   rOutProperties.push_back(
177
   Property( C2U("3DRelativeHeight"),
178
                  PROP_DIAGRAM_3DRELATIVEHEIGHT,
179
                  ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)),
180
                  beans::PropertyAttribute::MAYBEVOID ));  
175
}
181
}
176
182
177
struct StaticDiagramDefaults_Initializer
183
struct StaticDiagramDefaults_Initializer
Lines 192-198 Link Here
192
        ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DIAGRAM_INCLUDE_HIDDEN_CELLS, true );
198
        ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DIAGRAM_INCLUDE_HIDDEN_CELLS, true );
193
        ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DIAGRAM_RIGHT_ANGLED_AXES, false );
199
        ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DIAGRAM_RIGHT_ANGLED_AXES, false );
194
        ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_DIAGRAM_STARTING_ANGLE, 90 );
200
        ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_DIAGRAM_STARTING_ANGLE, 90 );
195
        ::chart::SceneProperties::AddDefaultsToMap( rOutMap );
201
        ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_DIAGRAM_3DRELATIVEHEIGHT, 100 );
202
		 ::chart::SceneProperties::AddDefaultsToMap( rOutMap );
196
    }    
203
    }    
197
};
204
};
198
205
(-)chart2/source/model/template/PieChartType.cxx (-1 / +8 lines)
Lines 49-55 Link Here
49
49
50
enum
50
enum
51
{
51
{
52
    PROP_PIECHARTTYPE_USE_RINGS
52
    PROP_PIECHARTTYPE_USE_RINGS,
53
    PROP_PIECHARTTYPE_3DRELATIVEHEIGHT
53
};
54
};
54
55
55
void lcl_AddPropertiesToVector(
56
void lcl_AddPropertiesToVector(
Lines 61-66 Link Here
61
                  ::getBooleanCppuType(),
62
                  ::getBooleanCppuType(),
62
                  beans::PropertyAttribute::BOUND
63
                  beans::PropertyAttribute::BOUND
63
                  | beans::PropertyAttribute::MAYBEDEFAULT ));
64
                  | beans::PropertyAttribute::MAYBEDEFAULT ));
65
    rOutProperties.push_back(
66
        Property( C2U("3DRelativeHeight"),
67
                  PROP_PIECHARTTYPE_3DRELATIVEHEIGHT,
68
                  ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)),
69
                  beans::PropertyAttribute::MAYBEVOID ));
64
}
70
}
65
71
66
struct StaticPieChartTypeDefaults_Initializer
72
struct StaticPieChartTypeDefaults_Initializer
Lines 75-80 Link Here
75
    void lcl_AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap )
81
    void lcl_AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap )
76
    {
82
    {
77
        ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_PIECHARTTYPE_USE_RINGS, false );
83
        ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_PIECHARTTYPE_USE_RINGS, false );
84
    	::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_PIECHARTTYPE_3DRELATIVEHEIGHT, 100 );
78
    }    
85
    }    
79
};
86
};
80
87
(-)chart2/source/view/main/ChartView.cxx (+23 lines)
Lines 102-107 Link Here
102
#include <com/sun/star/view/XSelectionSupplier.hpp>
102
#include <com/sun/star/view/XSelectionSupplier.hpp>
103
#include <svl/languageoptions.hxx>
103
#include <svl/languageoptions.hxx>
104
#include <sot/clsids.hxx>
104
#include <sot/clsids.hxx>
105
#include "servicenames_charttypes.hxx"
105
106
106
//.............................................................................
107
//.............................................................................
107
namespace chart
108
namespace chart
Lines 642-647 Link Here
642
    sal_Bool bGroupBarsPerAxis = sal_True;
643
    sal_Bool bGroupBarsPerAxis = sal_True;
643
    sal_Bool bIncludeHiddenCells = sal_True;
644
    sal_Bool bIncludeHiddenCells = sal_True;
644
    sal_Int32 nStartingAngle = 90;
645
    sal_Int32 nStartingAngle = 90;
646
    sal_Int32 n3DRelativeHeight = 100;
645
    try
647
    try
646
    {
648
    {
647
        uno::Reference< beans::XPropertySet > xDiaProp( xDiagram, uno::UNO_QUERY_THROW );
649
        uno::Reference< beans::XPropertySet > xDiaProp( xDiagram, uno::UNO_QUERY_THROW );
Lines 650-655 Link Here
650
        xDiaProp->getPropertyValue( C2U( "GroupBarsPerAxis" ) ) >>= bGroupBarsPerAxis;
652
        xDiaProp->getPropertyValue( C2U( "GroupBarsPerAxis" ) ) >>= bGroupBarsPerAxis;
651
        xDiaProp->getPropertyValue( C2U( "IncludeHiddenCells" ) ) >>= bIncludeHiddenCells;
653
        xDiaProp->getPropertyValue( C2U( "IncludeHiddenCells" ) ) >>= bIncludeHiddenCells;
652
        xDiaProp->getPropertyValue( C2U( "StartingAngle" ) ) >>= nStartingAngle;
654
        xDiaProp->getPropertyValue( C2U( "StartingAngle" ) ) >>= nStartingAngle;
655
    
656
        if (nDimensionCount == 3)	
657
        {
658
             xDiaProp->getPropertyValue( C2U( "3DRelativeHeight" ) ) >>= n3DRelativeHeight;
659
        }
653
    }
660
    }
654
    catch( const uno::Exception & ex )
661
    catch( const uno::Exception & ex )
655
    {
662
    {
Lines 684-689 Link Here
684
        for( sal_Int32 nT = 0; nT < aChartTypeList.getLength(); ++nT )
691
        for( sal_Int32 nT = 0; nT < aChartTypeList.getLength(); ++nT )
685
        {
692
        {
686
            uno::Reference< XChartType > xChartType( aChartTypeList[nT] );
693
            uno::Reference< XChartType > xChartType( aChartTypeList[nT] );
694
            if(3 == nDimensionCount && xChartType->getChartType().equalsIgnoreAsciiCase(CHART2_SERVICE_NAME_CHARTTYPE_PIE))
695
            {
696
                uno::Reference< beans::XPropertySet > xPropertySet( xChartType, uno::UNO_QUERY );
697
                if (xPropertySet.is())
698
                {
699
                    try
700
                    {
701
                        sal_Int32 n3DRelativeHeightOldValue(100);
702
                        uno::Any aAny = xPropertySet->getPropertyValue( C2U("3DRelativeHeight") );
703
                        aAny >>= n3DRelativeHeightOldValue;
704
                        if (n3DRelativeHeightOldValue != n3DRelativeHeight)
705
                            xPropertySet->setPropertyValue( C2U("3DRelativeHeight"), uno::makeAny(n3DRelativeHeight) );
706
                    }
707
                    catch(const uno::Exception& e){}
708
                }
709
            }
687
710
688
            if(nT==0)
711
            if(nT==0)
689
                m_bChartTypeUsesShiftedCategoryPositionPerDefault = ChartTypeHelper::shiftCategoryPosAtXAxisPerDefault( xChartType );
712
                m_bChartTypeUsesShiftedCategoryPositionPerDefault = ChartTypeHelper::shiftCategoryPosAtXAxisPerDefault( xChartType );
(-)chart2/source/view/charttypes/PieChart.cxx (-1 / +12 lines)
Lines 365-370 Link Here
365
365
366
    m_aLabelInfoList.clear();
366
    m_aLabelInfoList.clear();
367
    ::rtl::math::setNan(&m_fMaxOffset);
367
    ::rtl::math::setNan(&m_fMaxOffset);
368
    sal_Int32 n3DRelativeHeight = 100;
369
    uno::Reference< beans::XPropertySet > xPropertySet( m_xChartTypeModel, uno::UNO_QUERY );
370
    if ( (m_nDimension==3) && xPropertySet.is())
371
    {
372
		try
373
		{
374
			uno::Any aAny = xPropertySet->getPropertyValue( C2U("3DRelativeHeight") );
375
			aAny >>= n3DRelativeHeight;
376
		}
377
		catch(const uno::Exception& e) {}
378
    }
368
379
369
//=============================================================================
380
//=============================================================================
370
    for( double fSlotX=0; aXSlotIter != aXSlotEnd && (m_bUseRings||fSlotX<0.5 ); aXSlotIter++, fSlotX+=1.0 )
381
    for( double fSlotX=0; aXSlotIter != aXSlotEnd && (m_bUseRings||fSlotX<0.5 ); aXSlotIter++, fSlotX+=1.0 )
Lines 406-412 Link Here
406
                continue;
417
                continue;
407
418
408
            double fLogicZ = -1.0;//as defined
419
            double fLogicZ = -1.0;//as defined
409
            double fDepth  = this->getTransformedDepth();
420
            double fDepth  = this->getTransformedDepth() * (n3DRelativeHeight / 100.0);
410
//=============================================================================
421
//=============================================================================
411
422
412
            uno::Reference< drawing::XShapes > xSeriesGroupShape_Shapes = getSeriesGroupShape(pSeries, xSeriesTarget);
423
            uno::Reference< drawing::XShapes > xSeriesGroupShape_Shapes = getSeriesGroupShape(pSeries, xSeriesTarget);

Return to issue 119989