diff --git a/oox/source/shape/ShapeContextHandler.cxx b/oox/source/shape/ShapeContextHandler.cxx
index 179c10a..8ab5840 100644
--- a/oox/source/shape/ShapeContextHandler.cxx
+++ b/oox/source/shape/ShapeContextHandler.cxx
@@ -16,7 +16,6 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-
 #include <com/sun/star/xml/sax/XFastSAXSerializable.hpp>
 
 #include "ShapeContextHandler.hxx"
@@ -111,6 +110,15 @@ ShapeContextHandler::getGraphicShapeContext(::sal_Int32 Element )
                 mxGraphicShapeContext.set
                 (new GraphicShapeContext(*rFragmentHandler, pMasterShape, mpShape));
                 break;
+                // create the context for chart element. here we are creating 'ChartGraphicDataContext'
+                // object available in "graphicshapecontext.hxx"
+            case XML_chart:
+            	mpShape.reset(new Shape("com.sun.star.drawing.GraphicObjectShape" ));
+				mxGraphicShapeContext.set
+				(new ChartGraphicDataContext(*rFragmentHandler, mpShape, true));
+
+				break;
+
             default:
                 break;
         }
@@ -188,7 +196,8 @@ void SAL_CALL ShapeContextHandler::startFastElement
 
     mpThemePtr.reset(new Theme());
 
-    if (Element == DGM_TOKEN(relIds) || Element == LC_TOKEN(lockedCanvas))
+    // for 'chart' element create fast child context.
+    if (Element == DGM_TOKEN(relIds) || Element == LC_TOKEN(lockedCanvas) || Element == C_TOKEN(chart))
     {
         // Parse the theme relation, if available; the diagram won't have colors without it.
         if (!msRelationFragmentPath.isEmpty())
@@ -344,6 +353,20 @@ ShapeContextHandler::getShape() throw (uno::RuntimeException)
                 mxLockedCanvasContext.clear();
             }
         }
+        // As mentioned in above changes that ChartGraphicDataContext is created for chart element,  now it is used to
+        // call addShape() funtion which calls the import for elements availble in chart.xml file. for details look at the
+        // "finalizeXShape()" function of 'oox/source/drawingml/shape.cxx'
+        // if you look at the code of 'core/oox/source/drawingml/chart/chartspacefragment.cxx' files ChartSpaceFragment::onCreateContext
+        // function it gets hit after our changes. 'c:chartSpace' is the root of chart.xml files.
+        else if (mxGraphicShapeContext.is())
+        {
+        	basegfx::B2DHomMatrix aMatrix;
+        	ChartGraphicDataContext* pChartGraphicDataContext = dynamic_cast<ChartGraphicDataContext*>(mxGraphicShapeContext.get());
+        	oox::drawingml::ShapePtr pShapePtr( pChartGraphicDataContext->getShape());
+			pShapePtr->addShape( *mxFilterBase, mpThemePtr.get(), xShapes, aMatrix, pShapePtr->getFillProperties() );
+			xResult = pShapePtr->getXShape();
+        	mxGraphicShapeContext.clear();
+        }
         else if (mpShape.get() != NULL)
         {
             basegfx::B2DHomMatrix aTransformation;
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
index ae06e575..ebeb4ec 100644
--- a/sw/source/ui/uno/unotxdoc.cxx
+++ b/sw/source/ui/uno/unotxdoc.cxx
@@ -1702,8 +1702,9 @@ Reference< XInterface >  SwXTextDocument::createInstance(const OUString& rServic
                 //! adding the shapes to the draw page).
                 //! For inserting OLE objects the proper way is to use
                 //! "com.sun.star.text.TextEmbeddedObject"!
-                if (rServiceName.lastIndexOf( ".OLE2Shape" ) == rServiceName.getLength() - 10)
-                    throw ServiceNotRegisteredException();  // declare service to be not registered with this factory
+            	// following lines were resulting in crash after our changes for just commited them for now.
+//                if (rServiceName.lastIndexOf( ".OLE2Shape" ) == rServiceName.getLength() - 10)
+//                    throw ServiceNotRegisteredException();  // declare service to be not registered with this factory
 
                 //
                 // the XML import is allowed to create instances of com.sun.star.drawing.OLE2Shape.
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx
index 951b01e..0627fbd 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -1206,6 +1206,8 @@ void GraphicImport::lcl_sprm(Sprm & rSprm)
         case NS_ooxml::LN_pic_pic:
         case NS_ooxml::LN_dgm_relIds:
         case NS_ooxml::LN_lc_lockedCanvas:
+        // for processing the chart tag
+        case NS_ooxml::LN_c_chart:
         {
             writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
             if( pProperties.get())
diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml
index 64126ce..2b3aaa6 100644
--- a/writerfilter/source/ooxml/model.xml
+++ b/writerfilter/source/ooxml/model.xml
@@ -27,6 +27,12 @@
   <namespace-alias name="http://schemas.openxmlformats.org/drawingml/2006/picture" alias="picture" id="dmlPicture"/>
   <namespace-alias name="http://schemas.openxmlformats.org/drawingml/2006/diagram" alias="diagram" id="dmlDiagram"/>
   <namespace-alias name="http://schemas.openxmlformats.org/drawingml/2006/lockedCanvas" alias="lockedCanvas" id="dmlLockedCanvas"/>
+  <!-- model.xml is the input for the xsl scripts nearby and those are generating c++ code for the parser 
+    most of the calls are then handled by OOXMLFastContextHandler and friends.
+    writerfilter/documentation/ooxml/model.xml contains a documentation for model.xml.
+    following is the entry for Chart name space.
+  -->
+  <namespace-alias name="http://schemas.openxmlformats.org/drawingml/2006/chart" alias="chart" id="dmlChart"/>
   <namespace-alias name="urn:schemas-microsoft-com:office:word" alias="vml_wordprocessingDrawing" id="vmlWord"/>
   <namespace-alias name="http://schemas.openxmlformats.org/wordprocessingml/2006/main" alias="wordprocessingml" id="doc"/>
   <namespace-alias name="http://schemas.openxmlformats.org/officeDocument/2006/math" alias="math" id="officeMath"/>
@@ -5168,6 +5174,8 @@
           <ref name="pic"/>
           <ref name="relIds"/>
           <ref name="lockedCanvas"/>
+          <!-- Register the chart with its parent.-->
+          <ref name="chart"/>
           <element>
             <anyName/>
             <ref name="BUILT_IN_ANY_TYPE"/>
@@ -5195,6 +5203,8 @@
       <element name="pic" tokenid="ooxml:CT_GraphicalObjectData_pic"/>
       <element name="relIds" tokenid="ooxml:CT_GraphicalObjectData_relIds"/>
       <element name="lockedCanvas" tokenid="ooxml:CT_GraphicalObjectData_lockedCanvas"/>
+      <!-- Register the chart with its parent.-->
+      <element name="chart" tokenid="ooxml:CT_GraphicalObjectData_chart"/>
       <attribute name="uri" tokenid="ooxml:CT_GraphicalObjectData_uri"/>
     </resource>
     <resource name="CT_GraphicalObject" resource="Properties" tag="shape">
@@ -8471,6 +8481,17 @@
           <ref name="CT_GvmlGroupShape"/>
         </element>
       </define>
+       <!-- for each  <define> there is a context class. for more details read documentationin '/writerfilter/inc/ooxml/OOXMLDocument.hxx' -->
+      <define xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" name="CT_Chart">
+        <attribute name="r:id">
+          <text/>
+        </attribute>
+        </define>
+      <define name="chart">
+        <element xmlns:c="http://schemas.openxmlformats.org/drawingml/2006/chart" name="c:chart">
+        	<ref name="CT_Chart"/>
+        </element>
+      </define>
     </grammar>
     <resource name="CT_PictureNonVisual" resource="Properties" tag="shape">
       <element name="cNvPr" tokenid="ooxml:CT_PictureNonVisual_cNvPr"/>
@@ -8500,6 +8521,15 @@
     <resource name="lockedCanvas" resource="Shape" tag="shape">
       <element xmlns:lc="http://schemas.openxmlformats.org/drawingml/2006/lockedCanvas" name="lc:lockedCanvas" tokenid="ooxml:lc_lockedCanvas"/>
     </resource>
+    <!-- Attribute resource="Shape" means it will be handled by "OOXMLFastContextHandlerShape" class available in
+	 '/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx' -->
+    <resource xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" name="CT_Chart" resource="Shape" tag="shape">
+      <attribute name="r:id" tokenid="ooxml:CT_RelId_chart"/>
+    </resource>
+    <resource name="chart" resource="Shape" tag="shape">
+    	<element xmlns:c="http://schemas.openxmlformats.org/drawingml/2006/chart" name="c:chart" tokenid="ooxml:c_chart"/>
+    </resource>
+    
   </namespace>
   <namespace name="vml-main" file="vml-main.rng" todo="ignore">
     <start name="shape"/>
