diff --git a/plugins/chartshape/Axis.cpp b/plugins/chartshape/Axis.cpp
index 5f16f18..2a59952 100644
--- a/plugins/chartshape/Axis.cpp
+++ b/plugins/chartshape/Axis.cpp
@@ -1202,19 +1202,19 @@ bool Axis::loadOdf( const KoXmlElement &axisElement, KoShapeLoadingContext &cont
             if ( n.namespaceURI() != KoXmlNS::chart )
                 continue;
             if ( n.localName() == "title" ) {
-                if ( n.hasAttributeNS( KoXmlNS::svg, "x" )
-                     && n.hasAttributeNS( KoXmlNS::svg, "y" ) )
-                {
-                    const qreal x = KoUnit::parseValue( n.attributeNS( KoXmlNS::svg, "x" ) );
-                    const qreal y = KoUnit::parseValue( n.attributeNS( KoXmlNS::svg, "y" ) );
+                const QString svgX = n.attributeNS(KoXmlNS::svg, "x");
+                const QString svgY = n.attributeNS(KoXmlNS::svg, "y");
+                if (!svgX.isEmpty() && !svgY.isEmpty()) {
+                    const qreal x = KoUnit::parseValue(svgX);
+                    const qreal y = KoUnit::parseValue(svgY);
                     d->title->setPosition( QPointF( x, y ) );
                 }
 
-                if ( n.hasAttributeNS( KoXmlNS::svg, "width" )
-                     && n.hasAttributeNS( KoXmlNS::svg, "height" ) )
-                {
-                    const qreal width = KoUnit::parseValue( n.attributeNS( KoXmlNS::svg, "width" ) );
-                    const qreal height = KoUnit::parseValue( n.attributeNS( KoXmlNS::svg, "height" ) );
+                const QString svgWidth = n.attributeNS(KoXmlNS::svg, "width");
+                const QString svgHeight = n.attributeNS(KoXmlNS::svg, "height");
+                if (!svgWidth.isEmpty() && !svgHeight.isEmpty()) {
+                    const qreal width = KoUnit::parseValue(svgWidth);
+                    const qreal height = KoUnit::parseValue(svgHeight);
                     d->title->setSize( QSizeF( width, height ) );
                 }
 
@@ -1223,8 +1223,9 @@ bool Axis::loadOdf( const KoXmlElement &axisElement, KoShapeLoadingContext &cont
                     context.odfLoadingContext().fillStyleStack( n, KoXmlNS::chart, "style-name", "chart" );
                     styleStack.setTypeProperties( "text" );
 
-                    if ( styleStack.hasProperty( KoXmlNS::fo, "font-size" ) ) {
-                        const qreal fontSize = KoUnit::parseValue( styleStack.property( KoXmlNS::fo, "font-size" ) );
+                    const QString foFontSize = styleStack.property(KoXmlNS::fo, "font-size");
+                    if (!foFontSize.isEmpty()) {
+                        const qreal fontSize = KoUnit::parseValue(foFontSize);
                         QFont font = d->titleData->document()->defaultFont();
                         font.setPointSizeF( fontSize );
                         d->titleData->document()->setDefaultFont( font );
@@ -1242,8 +1243,8 @@ bool Axis::loadOdf( const KoXmlElement &axisElement, KoShapeLoadingContext &cont
             }
             else if ( n.localName() == "grid" ) {
                 bool major = false;
-                if ( n.hasAttributeNS( KoXmlNS::chart, "class" ) ) {
-                    const QString className = n.attributeNS( KoXmlNS::chart, "class" );
+                const QString className = n.attributeNS( KoXmlNS::chart, "class" );
+                if (!className.isEmpty()) {
                     if ( className == "major" )
                         major = true;
                 } else {
@@ -1261,9 +1262,8 @@ bool Axis::loadOdf( const KoXmlElement &axisElement, KoShapeLoadingContext &cont
                     styleStack.clear();
                     context.odfLoadingContext().fillStyleStack( n, KoXmlNS::style, "style-name", "chart" );
                     styleStack.setTypeProperties( "graphic" );
-                    if ( styleStack.hasProperty( KoXmlNS::svg, "stroke-color" ) ) {
-                        const QString strokeColor = styleStack.property( KoXmlNS::svg, "stroke-color" );
-                        //d->showMajorGrid = true;
+                    const QString strokeColor = styleStack.property( KoXmlNS::svg, "stroke-color" );
+                    if (!strokeColor.isEmpty()) {
                         if ( major )
                             gridPen = QPen( QColor( strokeColor ) );
                         else
@@ -1272,18 +1272,21 @@ bool Axis::loadOdf( const KoXmlElement &axisElement, KoShapeLoadingContext &cont
                 }
             }
             else if ( n.localName() == "categories" ) {
-                if ( n.hasAttributeNS( KoXmlNS::table, "cell-range-address" ) ) {
-                    const CellRegion region = CellRegion( helper->tableSource, n.attributeNS( KoXmlNS::table, "cell-range-address" ) );
+                const QString cellRangeAddress = n.attributeNS(KoXmlNS::table, "cell-range-address");
+                if (!cellRangeAddress.isEmpty()) {
+                    const CellRegion region = CellRegion(helper->tableSource, cellRangeAddress);
                     helper->categoryRegionSpecifiedInXAxis = true;
                     plotArea()->proxyModel()->setCategoryDataRegion( region );
                 }
             }
         }
 
+#if 0 // comment out as it does nothing
         if ( axisElement.hasAttributeNS( KoXmlNS::chart, "axis-name" ) ) {
             const QString name = axisElement.attributeNS( KoXmlNS::chart, "axis-name", QString() );
             //setTitleText( name );
         }
+#endif
 
         // NOTE: chart:dimension already handled by PlotArea before and passed
         // explicitly in the constructor.
@@ -1299,28 +1302,29 @@ bool Axis::loadOdf( const KoXmlElement &axisElement, KoShapeLoadingContext &cont
 
         styleStack.setTypeProperties( "chart" );
 
-        if ( styleStack.hasProperty( KoXmlNS::chart, "logarithmic" )
-             && styleStack.property( KoXmlNS::chart, "logarithmic" ) == "true" )
-        {
-            setScalingLogarithmic( true );
-        }
+        setScalingLogarithmic(styleStack.property(KoXmlNS::chart, "logarithmic") == "true" );
 
-        if ( styleStack.hasProperty( KoXmlNS::chart, "reverse-direction" )
-             && styleStack.property( KoXmlNS::chart, "reverse-direction" ) == "true" )
-        {
-            reverseAxis = true;
-        }
+        reverseAxis = styleStack.property(KoXmlNS::chart, "reverse-direction") == "true";
 
-        if ( styleStack.hasProperty( KoXmlNS::chart, "interval-major" ) )
-            setMajorInterval( KoUnit::parseValue( styleStack.property( KoXmlNS::chart, "interval-major" ) ) );
-        if ( styleStack.hasProperty( KoXmlNS::chart, "interval-minor-divisor" ) )
-            setMinorIntervalDivisor( KoUnit::parseValue( styleStack.property( KoXmlNS::chart, "interval-minor-divisor" ) ) );
-        if ( styleStack.hasProperty( KoXmlNS::chart, "display-label" ) )
-            setShowLabels( styleStack.property( KoXmlNS::chart, "display-label" ) != "false" );
-        if ( styleStack.hasProperty( KoXmlNS::chart, "visible" ) )
-            setVisible( styleStack.property( KoXmlNS::chart, "visible" )  != "false" );
-        if ( styleStack.hasProperty( KoXmlNS::chart, "minimum" ) ) {
-            const qreal minimum = styleStack.property( KoXmlNS::chart, "minimum" ).toDouble();
+        const QString intervalMajor = styleStack.property(KoXmlNS::chart, "interval-major");
+        if (!intervalMajor.isEmpty()) {
+            setMajorInterval(KoUnit::parseValue(intervalMajor));
+        }
+        const QString intervalMinorDivisor = styleStack.property(KoXmlNS::chart, "interval-minor-divisor");
+        if (!intervalMinorDivisor.isEmpty()) {
+            setMinorIntervalDivisor(KoUnit::parseValue(intervalMinorDivisor));
+        }
+        const QString displayLabel = styleStack.property(KoXmlNS::chart, "display-label");
+        if (!displayLabel.isEmpty()) {
+            setShowLabels(displayLabel != "false");
+        }
+        const QString visible = styleStack.property(KoXmlNS::chart, "visible");
+        if (!visible.isEmpty()) {
+            setVisible(visible != "false");
+        }
+        const QString chartMinimum = styleStack.property(KoXmlNS::chart, "minimum");
+        if (!chartMinimum.isEmpty()) {
+            const qreal minimum = chartMinimum.toDouble();
             const qreal maximum = orientation() == Qt::Vertical
                                     ? d->kdPlane->verticalRange().second
                                     : d->kdPlane->horizontalRange().second;
@@ -1329,20 +1333,20 @@ bool Axis::loadOdf( const KoXmlElement &axisElement, KoShapeLoadingContext &cont
             else
                 d->kdPlane->setHorizontalRange( qMakePair( minimum, maximum ) );
         }
-        if ( styleStack.hasProperty( KoXmlNS::chart, "maximum" ) ) {
+        const QString chartMaximum = styleStack.property(KoXmlNS::chart, "maximum");
+        if (!chartMaximum.isEmpty()) {
             const qreal minimum = orientation() == Qt::Vertical
                                     ? d->kdPlane->verticalRange().first
                                     : d->kdPlane->horizontalRange().first;
-            const qreal maximum = styleStack.property( KoXmlNS::chart, "maximum" ).toDouble();
+            const qreal maximum = chartMaximum.toDouble();
             if ( orientation() == Qt::Vertical )
                 d->kdPlane->setVerticalRange( qMakePair( minimum, maximum ) );
             else
                 d->kdPlane->setHorizontalRange( qMakePair( minimum, maximum ) );
         }
         styleStack.setTypeProperties( "text" );
-        if ( styleStack.hasProperty( KoXmlNS::fo, "font-size" ) )
-        {
-            QString fontSizeString =  styleStack.property( KoXmlNS::fo, "font-size" );
+        QString fontSizeString = styleStack.property(KoXmlNS::fo, "font-size");
+        if (!fontSizeString.isEmpty()) {
             const QString unitString = fontSizeString.right( 2 );
             fontSizeString.remove( unitString );
             bool ok = false;
diff --git a/plugins/chartshape/ChartShape.cpp b/plugins/chartshape/ChartShape.cpp
index b115ec2..308d67d 100644
--- a/plugins/chartshape/ChartShape.cpp
+++ b/plugins/chartshape/ChartShape.cpp
@@ -320,12 +320,14 @@ bool ChartShape::Private::loadOdfLabel( KoShape *label, KoXmlElement &labelEleme
     // 2. set the position
     QPointF pos = label->position();
     bool posChanged = false;
-    if ( labelElement.hasAttributeNS( KoXmlNS::svg, "x" ) ) {
-        pos.setX( KoUnit::parseValue( labelElement.attributeNS( KoXmlNS::svg, "x", QString() ) ) );
+    const QString x = labelElement.attributeNS(KoXmlNS::svg, "x", QString());
+    if (!x.isEmpty()) {
+        pos.setX(KoUnit::parseValue(x));
         posChanged = true;
     }
-    if ( labelElement.hasAttributeNS( KoXmlNS::svg, "y" ) ) {
-        pos.setY( KoUnit::parseValue( labelElement.attributeNS( KoXmlNS::svg, "y", QString() ) ) );
+    const QString y = labelElement.attributeNS(KoXmlNS::svg, "y", QString());
+    if (!y.isEmpty()) {
+        pos.setY(KoUnit::parseValue(y));
         posChanged = true;
     }
     if ( posChanged ) {
@@ -770,16 +772,14 @@ bool ChartShape::loadEmbeddedDocument( KoStore *store,
                                        const KoXmlElement &objectElement,
                                        const KoOdfLoadingContext &loadingContext )
 {
-    if ( !objectElement.hasAttributeNS( KoXmlNS::xlink, "href" ) ) {
-        kError() << "Object element has no valid xlink:href attribute";
-        return false;
-    }
-
     QString url = objectElement.attributeNS( KoXmlNS::xlink, "href" );
-
-    // It can happen that the url is empty e.g. when it is a
-    // presentation:placeholder.
-    if ( url.isEmpty() ) {
+    if (url.isEmpty()) {
+        if (!objectElement.hasAttributeNS(KoXmlNS::xlink, "href")) {
+            kError() << "Object element has no valid xlink:href attribute";
+            return false;
+        }
+        // It can happen that the url is empty e.g. when it is a
+        // presentation:placeholder.
         return true;
     }
 
@@ -967,8 +967,10 @@ bool ChartShape::loadOdfChartElement( const KoXmlElement &chartElement,
     }
 #endif
 
+    // 1. Load the chart type.
+    const QString chartClass = chartElement.attributeNS(KoXmlNS::chart, "class", QString());
     // Check if we're loading an embedded document
-    if ( !chartElement.hasAttributeNS( KoXmlNS::chart, "class" ) ) {
+    if (chartClass.isEmpty()) {
         kDebug(35001) << "Error: Embedded document has no chart:class attribute.";
         return false;
     }
@@ -976,9 +978,6 @@ bool ChartShape::loadOdfChartElement( const KoXmlElement &chartElement,
     Q_ASSERT( d->plotArea );
 
 
-    // 1. Load the chart type.
-    const QString chartClass = chartElement.attributeNS( KoXmlNS::chart,
-                                                         "class", QString() );
     KChart::ChartType chartType = KChart::BarChartType;
     // Find out what charttype the chart class corresponds to.
     bool  knownType = false;
@@ -1004,6 +1003,57 @@ bool ChartShape::loadOdfChartElement( const KoXmlElement &chartElement,
     }
 
 
+#if 1
+    bool titleVisible = false;
+    bool subTitleVisible = false;
+    bool footerVisible = false;
+    bool legendVisible = false;
+    KoXmlElement element;
+    forEachElement(element, chartElement) {
+        if (element.namespaceURI() == KoXmlNS::chart) {
+            if (element.localName() == "plot-area") {
+                d->plotArea->setChartType(chartType);
+                d->plotArea->setChartSubType(chartSubType());
+                if (!d->plotArea->loadOdf(element, context)) {
+                    return false;
+                }
+            }
+            else if (element.localName() == "title") {
+                if (!d->loadOdfLabel(d->title, element)) {
+                    return false;
+                }
+                titleVisible = true;
+            }
+            else if (element.localName() == "subtitle") {
+                if (!d->loadOdfLabel(d->footer, element)) {
+                    return false;
+                }
+                subTitleVisible = true;
+            }
+            else if (element.localName() == "footer") {
+                if (!d->loadOdfLabel(d->footer, element)) {
+                    return false;
+                }
+                footerVisible = true;
+            }
+            else if (element.localName() == "legend") {
+                if (!d->legend->loadOdf(element, context)) {
+                    return false;
+                }
+                legendVisible = true;
+            }
+        }
+        else if (element.namespaceURI() == KoXmlNS::table && element.localName() == "table") {
+            if (!loadOdfData(element, context)) {
+                return false;
+            }
+        }
+    }
+    d->setChildVisible(d->title, titleVisible);
+    d->setChildVisible(d->subTitle, subTitleVisible);
+    d->setChildVisible(d->footer, footerVisible);
+    d->setChildVisible(d->legend, legendVisible);
+#else
     // 2. Load the data
 //     int dimensions = numDimensions( chartType );
 //     qDebug() << "DIMENSIONS" << dimensions;
@@ -1064,6 +1114,7 @@ bool ChartShape::loadOdfChartElement( const KoXmlElement &chartElement,
         if ( !d->legend->loadOdf( legendElem, context ) )
             return false;
     }
+#endif
 
     // 8. Sets the chart type
     setChartType( chartType );
diff --git a/plugins/chartshape/PlotArea.cpp b/plugins/chartshape/PlotArea.cpp
index 012881b..543f5b4 100644
--- a/plugins/chartshape/PlotArea.cpp
+++ b/plugins/chartshape/PlotArea.cpp
@@ -668,8 +668,6 @@ bool PlotArea::loadOdf( const KoXmlElement &plotAreaElement,
                 ;
         }
 #endif
-        styleStack.clear();
-        context.odfLoadingContext().fillStyleStack( plotAreaElement, KoXmlNS::chart, "style-name", "chart" );
     }
 
     // Now create and load the axis from the ODF. This needs to happen
@@ -683,10 +681,10 @@ bool PlotArea::loadOdf( const KoXmlElement &plotAreaElement,
             continue;
 
         if ( n.localName() == "axis" ) {
-            if ( !n.hasAttributeNS( KoXmlNS::chart, "dimension" ) )
+            const QString dimension = n.attributeNS( KoXmlNS::chart, "dimension", QString() );
+            if (dimension.isEmpty())
                 // We have to know what dimension the axis is supposed to be..
                 continue;
-            const QString dimension = n.attributeNS( KoXmlNS::chart, "dimension", QString() );
             AxisDimension dim;
             if      ( dimension == "x" ) dim = XAxisDimension;
             else if ( dimension == "y" ) dim = YAxisDimension;
@@ -738,6 +736,7 @@ bool PlotArea::loadOdf( const KoXmlElement &plotAreaElement,
             // FIXME
         }
         else if (d->chartType == StockChartType && n.localName() == "stock-range-line" ) {
+#if 0 // comment out as long nothing is donw here
             if ( n.hasAttributeNS( KoXmlNS::chart, "style-name" ) ) {
                 styleStack.clear();
                 context.odfLoadingContext().fillStyleStack( n, KoXmlNS::chart, "style-name", "chart" );
@@ -749,6 +748,7 @@ bool PlotArea::loadOdf( const KoXmlElement &plotAreaElement,
 
                 // FIXME: svg:stroke-width
             }
+#endif
         }
         else if ( n.localName() != "axis" && n.localName() != "series" ) {
             qWarning() << "PlotArea::loadOdf(): Unknown tag name " << n.localName();
