summaryrefslogtreecommitdiff
path: root/xmloff/source/chart/SchXMLChartContext.cxx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2007-06-11 13:52:25 +0000
committerOliver Bolte <obo@openoffice.org>2007-06-11 13:52:25 +0000
commitd2799b94d9233dc0b36b559c4499714061d1812f (patch)
treef38e9c29c45ea71a70fe5141b3b69a7a5cffd182 /xmloff/source/chart/SchXMLChartContext.cxx
parent86d68a9ced51b75339293c0cf727ad3b2e2cb285 (diff)
INTEGRATION: CWS chart05 (1.35.6); FILE MERGED
2007/05/30 12:35:41 iha 1.35.6.1: #i77915# 3D xy chart should be deep - use default charttype if none was given in the file
Diffstat (limited to 'xmloff/source/chart/SchXMLChartContext.cxx')
-rw-r--r--xmloff/source/chart/SchXMLChartContext.cxx13
1 files changed, 11 insertions, 2 deletions
diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx
index 6f9dfd9ce21a..05001d2e1060 100644
--- a/xmloff/source/chart/SchXMLChartContext.cxx
+++ b/xmloff/source/chart/SchXMLChartContext.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: SchXMLChartContext.cxx,v $
*
- * $Revision: 1.35 $
+ * $Revision: 1.36 $
*
- * last change: $Author: vg $ $Date: 2007-05-22 16:05:37 $
+ * last change: $Author: obo $ $Date: 2007-06-11 14:52:25 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -407,6 +407,15 @@ void SchXMLChartContext::StartElement( const uno::Reference< xml::sax::XAttribut
}
}
+ if( aOldChartTypeName.getLength()<= 0 )
+ {
+ DBG_ERROR( "need a charttype to create a diagram" );
+ //set a fallback value:
+ ::rtl::OUString aChartClass_Bar( GetXMLToken(XML_BAR ) );
+ aOldChartTypeName = SchXMLTools::GetChartTypeByClassName( aChartClass_Bar, true /* bUseOldNames */ );
+ maChartTypeServiceName = SchXMLTools::GetChartTypeByClassName( aChartClass_Bar, false /* bUseOldNames */ );
+ }
+
InitChart (aChartSize, bDomainForDefaultDataNeeded, aOldChartTypeName, bSetSwitchData);
if( bHasAddin )