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

(-)chart2/source/model/main/Diagram.cxx (-2 / +18 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_3DHEIGHT,
84
    PROP_DIAGRAM_ISEXCEL3DCHART
83
};
85
};
84
86
85
void lcl_AddPropertiesToVector(
87
void lcl_AddPropertiesToVector(
Lines 172-177 Link Here
172
                  ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)),
174
                  ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)),
173
                  beans::PropertyAttribute::BOUND
175
                  beans::PropertyAttribute::BOUND
174
                  | beans::PropertyAttribute::MAYBEVOID ));
176
                  | beans::PropertyAttribute::MAYBEVOID ));
177
   rOutProperties.push_back(
178
   Property( C2U("3DHeight"),
179
                  PROP_DIAGRAM_3DHEIGHT,
180
                  ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)),
181
                  beans::PropertyAttribute::MAYBEVOID ));  
182
183
	rOutProperties.push_back(
184
	Property( C2U("IsExcel3DChart"),
185
                  PROP_DIAGRAM_ISEXCEL3DCHART,
186
                  ::getBooleanCppuType(),
187
                  beans::PropertyAttribute::BOUND
188
                  | beans::PropertyAttribute::MAYBEDEFAULT ));
175
}
189
}
176
190
177
struct StaticDiagramDefaults_Initializer
191
struct StaticDiagramDefaults_Initializer
Lines 192-198 Link Here
192
        ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DIAGRAM_INCLUDE_HIDDEN_CELLS, true );
206
        ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DIAGRAM_INCLUDE_HIDDEN_CELLS, true );
193
        ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DIAGRAM_RIGHT_ANGLED_AXES, false );
207
        ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DIAGRAM_RIGHT_ANGLED_AXES, false );
194
        ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_DIAGRAM_STARTING_ANGLE, 90 );
208
        ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_DIAGRAM_STARTING_ANGLE, 90 );
195
        ::chart::SceneProperties::AddDefaultsToMap( rOutMap );
209
        ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_DIAGRAM_3DHEIGHT, 100 );
210
        ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DIAGRAM_ISEXCEL3DCHART, false ); 
211
		 ::chart::SceneProperties::AddDefaultsToMap( rOutMap );
196
    }    
212
    }    
197
};
213
};
198
214
(-)chart2/source/model/template/PieChartType.cxx (-1 / +17 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_3DHEIGHT,
54
    PROP_PIECHARTTYPE_ISEXCEL3DCHART
53
};
55
};
54
56
55
void lcl_AddPropertiesToVector(
57
void lcl_AddPropertiesToVector(
Lines 61-66 Link Here
61
                  ::getBooleanCppuType(),
63
                  ::getBooleanCppuType(),
62
                  beans::PropertyAttribute::BOUND
64
                  beans::PropertyAttribute::BOUND
63
                  | beans::PropertyAttribute::MAYBEDEFAULT ));
65
                  | beans::PropertyAttribute::MAYBEDEFAULT ));
66
    rOutProperties.push_back(
67
        Property( C2U("3DHeight"),
68
                  PROP_PIECHARTTYPE_3DHEIGHT,
69
                  ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)),
70
                  beans::PropertyAttribute::MAYBEVOID ));
71
72
    rOutProperties.push_back(
73
        Property( C2U( "IsExcel3DChart" ),
74
                  PROP_PIECHARTTYPE_ISEXCEL3DCHART,
75
                  ::getBooleanCppuType(),
76
                  beans::PropertyAttribute::BOUND
77
                  | beans::PropertyAttribute::MAYBEDEFAULT ));
64
}
78
}
65
79
66
struct StaticPieChartTypeDefaults_Initializer
80
struct StaticPieChartTypeDefaults_Initializer
Lines 75-80 Link Here
75
    void lcl_AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap )
89
    void lcl_AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap )
76
    {
90
    {
77
        ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_PIECHARTTYPE_USE_RINGS, false );
91
        ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_PIECHARTTYPE_USE_RINGS, false );
92
    	 ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_PIECHARTTYPE_3DHEIGHT, 100 );
93
    	 ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_PIECHARTTYPE_ISEXCEL3DCHART, false );
78
    }    
94
    }    
79
};
95
};
80
96
(-)chart2/source/view/charttypes/PieChart.cxx (-1 / +17 lines)
Lines 365-371 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 n3DHeight = 100;
369
    sal_Bool bIsExcel3DChart = sal_False;
370
    uno::Reference< beans::XPropertySet > xPropertySet( m_xChartTypeModel, uno::UNO_QUERY );
371
    if ( (m_nDimension==3) && xPropertySet.is())
372
    {
373
		try
374
		{
375
			uno::Any aAny = xPropertySet->getPropertyValue( C2U("3DHeight") );
376
			aAny >>= n3DHeight;
368
377
378
			aAny = xPropertySet->getPropertyValue( C2U("IsExcel3DChart") );
379
			aAny >>= bIsExcel3DChart;
380
		}
381
		catch(const uno::Exception& e) {}
382
    }
383
369
//=============================================================================
384
//=============================================================================
370
    for( double fSlotX=0; aXSlotIter != aXSlotEnd && (m_bUseRings||fSlotX<0.5 ); aXSlotIter++, fSlotX+=1.0 )
385
    for( double fSlotX=0; aXSlotIter != aXSlotEnd && (m_bUseRings||fSlotX<0.5 ); aXSlotIter++, fSlotX+=1.0 )
371
	{
386
	{
Lines 406-412 Link Here
406
                continue;
421
                continue;
407
422
408
            double fLogicZ = -1.0;//as defined
423
            double fLogicZ = -1.0;//as defined
409
            double fDepth  = this->getTransformedDepth();
424
           // double fDepth  = this->getTransformedDepth();    
425
            double fDepth  = bIsExcel3DChart ?  (this->getTransformedDepth()) * n3DHeight /(2*100) : this->getTransformedDepth();
410
//=============================================================================
426
//=============================================================================
411
427
412
            uno::Reference< drawing::XShapes > xSeriesGroupShape_Shapes = getSeriesGroupShape(pSeries, xSeriesTarget);
428
            uno::Reference< drawing::XShapes > xSeriesGroupShape_Shapes = getSeriesGroupShape(pSeries, xSeriesTarget);
(-)chart2/source/view/main/ChartView.cxx (+30 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 n3DHeight = 100;
647
    sal_Bool bIsExcel3DChart = sal_False;
645
    try
648
    try
646
    {
649
    {
647
        uno::Reference< beans::XPropertySet > xDiaProp( xDiagram, uno::UNO_QUERY_THROW );
650
        uno::Reference< beans::XPropertySet > xDiaProp( xDiagram, uno::UNO_QUERY_THROW );
Lines 650-655 Link Here
650
        xDiaProp->getPropertyValue( C2U( "GroupBarsPerAxis" ) ) >>= bGroupBarsPerAxis;
653
        xDiaProp->getPropertyValue( C2U( "GroupBarsPerAxis" ) ) >>= bGroupBarsPerAxis;
651
        xDiaProp->getPropertyValue( C2U( "IncludeHiddenCells" ) ) >>= bIncludeHiddenCells;
654
        xDiaProp->getPropertyValue( C2U( "IncludeHiddenCells" ) ) >>= bIncludeHiddenCells;
652
        xDiaProp->getPropertyValue( C2U( "StartingAngle" ) ) >>= nStartingAngle;
655
        xDiaProp->getPropertyValue( C2U( "StartingAngle" ) ) >>= nStartingAngle;
656
	if (nDimensionCount == 3)	
657
        {
658
             xDiaProp->getPropertyValue( C2U( "3DHeight" ) ) >>= n3DHeight;
659
             xDiaProp->getPropertyValue( C2U( "IsExcel3DChart" ) ) >>= bIsExcel3DChart;
660
        }
653
    }
661
    }
654
    catch( const uno::Exception & ex )
662
    catch( const uno::Exception & ex )
655
    {
663
    {
Lines 684-689 Link Here
684
        for( sal_Int32 nT = 0; nT < aChartTypeList.getLength(); ++nT )
692
        for( sal_Int32 nT = 0; nT < aChartTypeList.getLength(); ++nT )
685
        {
693
        {
686
            uno::Reference< XChartType > xChartType( aChartTypeList[nT] );
694
            uno::Reference< XChartType > xChartType( aChartTypeList[nT] );
695
            if (xChartType->getChartType().equalsIgnoreAsciiCase(CHART2_SERVICE_NAME_CHARTTYPE_PIE) && nDimensionCount == 3 )
696
            {
697
                uno::Reference< beans::XPropertySet > xPropertySet( xChartType, uno::UNO_QUERY );
698
                if (xPropertySet.is())
699
                {
700
                    try
701
                    {
702
                        sal_Int32 n3DHeightOldValue;	      
703
                        sal_Bool bIsExcelChartOld;
704
                        uno::Any aAny = xPropertySet->getPropertyValue( C2U("3DHeight") );
705
                        aAny >>= n3DHeightOldValue;
706
                        if (n3DHeightOldValue != n3DHeight)
707
                            xPropertySet->setPropertyValue( C2U("3DHeight"), uno::makeAny(n3DHeight) );
708
						
709
                        aAny = xPropertySet->getPropertyValue( C2U("IsExcel3DChart") );
710
                        aAny >>= bIsExcelChartOld;
711
                        if (bIsExcel3DChart != bIsExcelChartOld)
712
                            xPropertySet->setPropertyValue( C2U("IsExcel3DChart"), uno::makeAny(bIsExcel3DChart) );
713
                    }
714
                    catch(const uno::Exception& e){}
715
                }
716
            }
687
717
688
            if(nT==0)
718
            if(nT==0)
689
                m_bChartTypeUsesShiftedCategoryPositionPerDefault = ChartTypeHelper::shiftCategoryPosAtXAxisPerDefault( xChartType );
719
                m_bChartTypeUsesShiftedCategoryPositionPerDefault = ChartTypeHelper::shiftCategoryPosAtXAxisPerDefault( xChartType );
(-)sc/source/filter/excel/xichart.cxx (+2 lines)
Lines 2401-2406 Link Here
2401
    }
2401
    }
2402
2402
2403
    // properties
2403
    // properties
2404
    rPropSet.SetProperty( EXC_CHPROP_ISEXCEL3DCHART, true);
2405
    rPropSet.SetProperty( EXC_CHPROP_3DHEIGHT, (sal_Int32)maData.mnRelHeight);
2404
    rPropSet.SetProperty( EXC_CHPROP_ROTATIONVERTICAL, nRotationY );
2406
    rPropSet.SetProperty( EXC_CHPROP_ROTATIONVERTICAL, nRotationY );
2405
    rPropSet.SetProperty( EXC_CHPROP_ROTATIONHORIZONTAL, nRotationX );
2407
    rPropSet.SetProperty( EXC_CHPROP_ROTATIONHORIZONTAL, nRotationX );
2406
    rPropSet.SetProperty( EXC_CHPROP_PERSPECTIVE, nPerspective );
2408
    rPropSet.SetProperty( EXC_CHPROP_PERSPECTIVE, nPerspective );
(-)sc/source/filter/inc/xlchart.hxx (+2 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_3DHEIGHT                 CREATE_OUSTRING( "3DHeight" )
131
#define EXC_CHPROP_ISEXCEL3DCHART           CREATE_OUSTRING( "IsExcel3DChart" )
130
#define EXC_CHPROP_SHOW                     CREATE_OUSTRING( "Show" )
132
#define EXC_CHPROP_SHOW                     CREATE_OUSTRING( "Show" )
131
#define EXC_CHPROP_SHOWCORRELATION          CREATE_OUSTRING( "ShowCorrelationCoefficient" )
133
#define EXC_CHPROP_SHOWCORRELATION          CREATE_OUSTRING( "ShowCorrelationCoefficient" )
132
#define EXC_CHPROP_SHOWEQUATION             CREATE_OUSTRING( "ShowEquation" )
134
#define EXC_CHPROP_SHOWEQUATION             CREATE_OUSTRING( "ShowEquation" )

Return to issue 119989