summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-04-28 11:45:14 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-04-30 08:13:15 +0200
commitcff6ed154b3daf88c9972b1d8f6b00499e641338 (patch)
tree004ceba35c0e2de2be72f2bc1eb6d02a91196eec /oox
parent508280b0844c4775e55954c2803428287de93edb (diff)
fix rAngAx MSO 2007 vs OOXML default value
Change-Id: I7381e9987257325c7aad387ee0a2781a883be829
Diffstat (limited to 'oox')
-rw-r--r--oox/inc/drawingml/chart/plotareamodel.hxx2
-rw-r--r--oox/source/drawingml/chart/chartspaceconverter.cxx3
-rw-r--r--oox/source/drawingml/chart/chartspacefragment.cxx2
-rw-r--r--oox/source/drawingml/chart/plotareacontext.cxx4
-rw-r--r--oox/source/drawingml/chart/plotareamodel.cxx4
5 files changed, 8 insertions, 7 deletions
diff --git a/oox/inc/drawingml/chart/plotareamodel.hxx b/oox/inc/drawingml/chart/plotareamodel.hxx
index 3d8c6a0ce8ce..340fa8d9175d 100644
--- a/oox/inc/drawingml/chart/plotareamodel.hxx
+++ b/oox/inc/drawingml/chart/plotareamodel.hxx
@@ -40,7 +40,7 @@ struct View3DModel
sal_Int32 mnPerspective; /// Eye distance to the 3D objects.
bool mbRightAngled; /// True = right-angled axes in 3D view.
- explicit View3DModel();
+ explicit View3DModel(bool bMSO2007Doc);
~View3DModel();
};
diff --git a/oox/source/drawingml/chart/chartspaceconverter.cxx b/oox/source/drawingml/chart/chartspaceconverter.cxx
index 56a10ae8796b..b841954513db 100644
--- a/oox/source/drawingml/chart/chartspaceconverter.cxx
+++ b/oox/source/drawingml/chart/chartspaceconverter.cxx
@@ -78,9 +78,10 @@ void ChartSpaceConverter::convertFromModel( const Reference< XShapes >& rxExtern
PropertySet aBackPropSet( getChartDocument()->getPageBackground() );
getFormatter().convertFrameFormatting( aBackPropSet, mrModel.mxShapeProp, OBJECTTYPE_CHARTSPACE );
+ bool bMSO2007Doc = getFilter().isMSO2007Document();
// convert plot area (container of all chart type groups)
PlotAreaConverter aPlotAreaConv( *this, mrModel.mxPlotArea.getOrCreate() );
- aPlotAreaConv.convertFromModel( mrModel.mxView3D.getOrCreate() );
+ aPlotAreaConv.convertFromModel( mrModel.mxView3D.getOrCreate(bMSO2007Doc) );
// plot area converter has created the diagram object
Reference< XDiagram > xDiagram = getChartDocument()->getFirstDiagram();
diff --git a/oox/source/drawingml/chart/chartspacefragment.cxx b/oox/source/drawingml/chart/chartspacefragment.cxx
index 2c02642eb6c2..30ba8cc52c5f 100644
--- a/oox/source/drawingml/chart/chartspacefragment.cxx
+++ b/oox/source/drawingml/chart/chartspacefragment.cxx
@@ -115,7 +115,7 @@ ContextHandlerRef ChartSpaceFragment::onCreateContext( sal_Int32 nElement, const
case C_TOKEN( title ):
return new TitleContext( *this, mrModel.mxTitle.create() );
case C_TOKEN( view3D ):
- return new View3DContext( *this, mrModel.mxView3D.create() );
+ return new View3DContext( *this, mrModel.mxView3D.create(bMSO2007Document) );
}
break;
}
diff --git a/oox/source/drawingml/chart/plotareacontext.cxx b/oox/source/drawingml/chart/plotareacontext.cxx
index 2c9fb12e66bc..f19adbd309a5 100644
--- a/oox/source/drawingml/chart/plotareacontext.cxx
+++ b/oox/source/drawingml/chart/plotareacontext.cxx
@@ -44,6 +44,7 @@ View3DContext::~View3DContext()
ContextHandlerRef View3DContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
{
+ bool bMSO2007Doc = getFilter().isMSO2007Document();
switch( getCurrentElement() )
{
case C_TOKEN( view3D ):
@@ -59,8 +60,7 @@ ContextHandlerRef View3DContext::onCreateContext( sal_Int32 nElement, const Attr
mrModel.mnPerspective = rAttribs.getInteger( XML_val, 30 );
return 0;
case C_TOKEN( rAngAx ):
- // default is 'false', not 'true' as specified
- mrModel.mbRightAngled = rAttribs.getBool( XML_val, false );
+ mrModel.mbRightAngled = rAttribs.getBool( XML_val, !bMSO2007Doc );
return 0;
case C_TOKEN( rotX ):
// default value dependent on chart type
diff --git a/oox/source/drawingml/chart/plotareamodel.cxx b/oox/source/drawingml/chart/plotareamodel.cxx
index 7c6ea59f024a..9220d4901e5c 100644
--- a/oox/source/drawingml/chart/plotareamodel.cxx
+++ b/oox/source/drawingml/chart/plotareamodel.cxx
@@ -23,10 +23,10 @@ namespace oox {
namespace drawingml {
namespace chart {
-View3DModel::View3DModel() :
+View3DModel::View3DModel(bool bMSO2007Doc) :
mnDepthPercent( 100 ),
mnPerspective( 30 ),
- mbRightAngled( false )
+ mbRightAngled( !bMSO2007Doc )
{
}