Commits

Ivo Hinkelmann  committed 5a8c4b0 Merge

CWS-TOOLING: integrate CWS chartshapes

  • Participants
  • Parent commits da9c6e5, 3a37396

Comments (0)

Files changed (186)

File chart2/prj/build.lst

 ch	chart2\source\view\charttypes				nmake	-	all	ch_source_view_charttypes ch_inc NULL
 ch	chart2\source\view\diagram					nmake	-	all	ch_source_view_diagram ch_inc NULL
 ch	chart2\source\view\main						nmake	-	all	ch_source_view_main ch_inc NULL
-ch	chart2\source\controller					nmake	-	all	ch_source_controller ch_source_tools ch_source_view ch_source_controller_drawinglayer ch_source_controller_itemsetwrapper ch_source_controller_dialogs ch_source_controller_main ch_source_controller_chartapiwrapper ch_source_controller_accessibility ch_inc NULL
+ch	chart2\source\controller					nmake	-	all	ch_source_controller ch_source_tools ch_source_view ch_source_controller_drawinglayer ch_source_controller_itemsetwrapper ch_source_controller_dialogs ch_source_controller_main ch_source_controller_chartapiwrapper ch_source_controller_accessibility ch_inc ch_source_controller_menus NULL
 ch	chart2\source\controller\inc				get		-	all	ch_source_controller_inc NULL
 ch	chart2\source\controller\accessibility		nmake	-	all	ch_source_controller_accessibility ch_inc NULL
 ch	chart2\source\controller\dialogs			nmake	-	all	ch_source_controller_dialogs ch_inc NULL
 ch	chart2\source\controller\itemsetwrapper		nmake	-	all	ch_source_controller_itemsetwrapper ch_inc NULL
 ch  chart2\source\controller\chartapiwrapper	nmake   -   all ch_source_controller_chartapiwrapper ch_inc NULL
 ch	chart2\source\controller\main				nmake	-	all	ch_source_controller_main ch_inc NULL
+ch	chart2\source\controller\menus				nmake	-	all	ch_source_controller_menus ch_inc NULL
 ch	chart2\prj									get		-	all	ch_prj NULL

File chart2/source/controller/accessibility/AccessibleBase.cxx

 #include "precompiled_chart2.hxx"
 
 #include "AccessibleBase.hxx"
+#include "AccessibleChartShape.hxx"
 #include "ObjectHierarchy.hxx"
 #include "ObjectIdentifier.hxx"
 #include "chartview/ExplicitValueProvider.hxx"
     {
         ObjectHierarchy::tChildContainer aModelChildren(
             m_aAccInfo.m_spObjectHierarchy->getChildren( GetId() ));
-        ::std::vector< ChildCIDMap::key_type > aAccChildren;
+        ::std::vector< ChildOIDMap::key_type > aAccChildren;
         aAccChildren.reserve( aModelChildren.size());
-        ::std::transform( m_aChildCIDMap.begin(), m_aChildCIDMap.end(),
+        ::std::transform( m_aChildOIDMap.begin(), m_aChildOIDMap.end(),
                           ::std::back_inserter( aAccChildren ),
-                          ::std::select1st< ChildCIDMap::value_type >());
+                          ::std::select1st< ChildOIDMap::value_type >());
 
         ::std::sort( aModelChildren.begin(), aModelChildren.end());
 
-        ::std::vector< OUString > aChildrenToRemove, aChildrenToAdd;
+        ::std::vector< ObjectHierarchy::tOID > aChildrenToRemove, aChildrenToAdd;
         ::std::set_difference( aModelChildren.begin(), aModelChildren.end(),
                                aAccChildren.begin(), aAccChildren.end(),
                                ::std::back_inserter( aChildrenToAdd ));
                                aModelChildren.begin(), aModelChildren.end(),
                                ::std::back_inserter( aChildrenToRemove ));
 
-        ::std::vector< OUString >::const_iterator aIt( aChildrenToRemove.begin());
+        ::std::vector< ObjectHierarchy::tOID >::const_iterator aIt( aChildrenToRemove.begin());
         for( ; aIt != aChildrenToRemove.end(); ++aIt )
         {
-            RemoveChildById( *aIt );
+            RemoveChildByOId( *aIt );
         }
 
         AccessibleElementInfo aAccInfo( GetInfo());
 
         for( aIt = aChildrenToAdd.begin(); aIt != aChildrenToAdd.end(); ++aIt )
         {
-            aAccInfo.m_aCID = *aIt;
-            AddChild( ChartElementFactory::CreateChartElement( aAccInfo ));
+            aAccInfo.m_aOID = *aIt;
+            if ( aIt->isAutoGeneratedObject() )
+            {
+                AddChild( ChartElementFactory::CreateChartElement( aAccInfo ) );
+            }
+            else if ( aIt->isAdditionalShape() )
+            {
+                AddChild( new AccessibleChartShape( aAccInfo, true, false ) );
+            }
         }
         bResult = true;
     }
         Reference< XAccessible > xChild( pChild );
         m_aChildList.push_back( xChild );
 
-        m_aChildCIDMap[ pChild->GetId() ] = xChild;
+        m_aChildOIDMap[ pChild->GetId() ] = xChild;
 
         // inform listeners of new child
         if( m_bChildrenInitialized )
 /** in this method we imply that the Reference< XAccessible > elements in the
     vector are AccessibleBase objects !
  */
-void AccessibleBase::RemoveChildById( const ::rtl::OUString & rId )
+void AccessibleBase::RemoveChildByOId( const ObjectIdentifier& rOId )
 {
     // /--
     ClearableMutexGuard aGuard( GetMutex() );
 
-    ChildCIDMap::iterator aIt( m_aChildCIDMap.find( rId ));
-    if( aIt != m_aChildCIDMap.end())
+    ChildOIDMap::iterator aIt( m_aChildOIDMap.find( rOId ));
+    if( aIt != m_aChildOIDMap.end())
     {
         Reference< XAccessible > xChild( aIt->second );
 
         // remove from map
-        m_aChildCIDMap.erase( aIt );
+        m_aChildOIDMap.erase( aIt );
 
         // search child in vector
         ChildListVectorType::iterator aVecIter =
 
     // remove all children
     m_aChildList.clear();
-    m_aChildCIDMap.clear();
+    m_aChildOIDMap.clear();
 
     aGuard.clear();
     // \--
 
 AccessibleUniqueId AccessibleBase::GetId() const
 {
-    return m_aAccInfo.m_aCID;
+    return m_aAccInfo.m_aOID;
 }
 
 // ____________________________________
 {
     if( ! m_bStateSetInitialized )
     {
-        OUString aSelCID;
         Reference< view::XSelectionSupplier > xSelSupp( GetInfo().m_xSelectionSupplier );
-        if( xSelSupp.is() &&
-            ( xSelSupp->getSelection() >>= aSelCID ) &&
-            GetId().equals( aSelCID ) )
+        if ( xSelSupp.is() )
         {
-            AddState( AccessibleStateType::SELECTED );
-            AddState( AccessibleStateType::FOCUSED );
+            ObjectIdentifier aOID( xSelSupp->getSelection() );
+            if ( aOID.isValid() && GetId() == aOID )
+            {
+                AddState( AccessibleStateType::SELECTED );
+                AddState( AccessibleStateType::FOCUSED );
+            }
         }
         m_bStateSetInitialized = true;
     }
     if( pExplicitValueProvider )
     {
         Window* pWindow( VCLUnoHelper::GetWindow( m_aAccInfo.m_xWindow ));
-        awt::Rectangle aLogicRect( pExplicitValueProvider->getRectangleOfObject( m_aAccInfo.m_aCID ));
+        awt::Rectangle aLogicRect( pExplicitValueProvider->getRectangleOfObject( m_aAccInfo.m_aOID.getObjectCID() ));
         if( pWindow )
         {
             Rectangle aRect( aLogicRect.X, aLogicRect.Y,
 {
     CheckDisposeState();
 
-    OUString aSelCID;
     Reference< view::XSelectionSupplier > xSelSupp( GetInfo().m_xSelectionSupplier );
-    if( xSelSupp.is())
-        xSelSupp->select( uno::makeAny( GetId()));
+    if ( xSelSupp.is() )
+    {
+        xSelSupp->select( GetId().getAny() );
+    }
 }
 
 sal_Int32 SAL_CALL AccessibleBase::getForeground()
     if( m_bAlwaysTransparent )
         return nResult;
 
-    ObjectType eType( ObjectIdentifier::getObjectType( m_aAccInfo.m_aCID ));
+    ObjectIdentifier aOID( m_aAccInfo.m_aOID );
+    ObjectType eType( aOID.getObjectType() );
     Reference< beans::XPropertySet > xObjProp;
-    OUString aObjectCID = m_aAccInfo.m_aCID;
+    OUString aObjectCID = aOID.getObjectCID();
     if( eType == OBJECTTYPE_LEGEND_ENTRY )
     {
         // for colors get the data series/point properties

File chart2/source/controller/accessibility/AccessibleChartElement.cxx

     bool bResult = false;
     Reference< chart2::XTitle > xTitle(
         ObjectIdentifier::getObjectPropertySet(
-            GetInfo().m_aCID, Reference< chart2::XChartDocument >( GetInfo().m_xChartDocument )),
+            GetInfo().m_aOID.getObjectCID(), Reference< chart2::XChartDocument >( GetInfo().m_xChartDocument )),
         uno::UNO_QUERY );
     m_bHasText = xTitle.is();
 
         {
             Reference< lang::XInitialization > xInit( m_xTextHelper, uno::UNO_QUERY_THROW );
             Sequence< uno::Any > aArgs( 3 );
-            aArgs[0] <<= GetInfo().m_aCID;
+            aArgs[0] <<= GetInfo().m_aOID.getObjectCID();
             aArgs[1] <<= Reference< XAccessible >( this );
             aArgs[2] <<= Reference< awt::XWindow >( GetInfo().m_xWindow );
             xInit->initialize( aArgs );
     throw (::com::sun::star::uno::RuntimeException)
 {
     return ObjectNameProvider::getNameForCID(
-        GetInfo().m_aCID, GetInfo().m_xChartDocument );
+        GetInfo().m_aOID.getObjectCID(), GetInfo().m_xChartDocument );
 }
 
 // ________ AccessibleChartElement::XAccessibleContext (overloaded) ________
     {
         Reference< beans::XMultiPropertySet > xObjProp(
             ObjectIdentifier::getObjectPropertySet(
-                GetInfo().m_aCID, Reference< chart2::XChartDocument >( GetInfo().m_xChartDocument )), uno::UNO_QUERY );
+                GetInfo().m_aOID.getObjectCID(), Reference< chart2::XChartDocument >( GetInfo().m_xChartDocument )), uno::UNO_QUERY );
         awt::FontDescriptor aDescr(
             CharacterProperties::createFontDescriptorFromPropertySet( xObjProp ));
         xFont = xDevice->getFont( aDescr );
     CheckDisposeState();
 
     return ObjectNameProvider::getHelpText(
-        GetInfo().m_aCID, Reference< chart2::XChartDocument >( GetInfo().m_xChartDocument ));
+        GetInfo().m_aOID.getObjectCID(), Reference< chart2::XChartDocument >( GetInfo().m_xChartDocument ));
 }
 
 // ________ XAccessibleComponent ________
     return AccessibleBase::containsPoint( aPoint );
 }
 
-Reference< accessibility::XAccessible > SAL_CALL AccessibleChartElement::getAccessibleAtPoint( const awt::Point& aPoint )
+Reference< XAccessible > SAL_CALL AccessibleChartElement::getAccessibleAtPoint( const awt::Point& aPoint )
     throw (uno::RuntimeException)
 {
     return AccessibleBase::getAccessibleAtPoint( aPoint );

File chart2/source/controller/accessibility/AccessibleChartShape.cxx

+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_chart2.hxx"
+
+#include "AccessibleChartShape.hxx"
+#include "ObjectHierarchy.hxx"
+#include "ObjectIdentifier.hxx"
+
+#include <toolkit/helper/vclunohelper.hxx>
+#include <svx/ShapeTypeHandler.hxx>
+#include <svx/AccessibleShape.hxx>
+#include <svx/AccessibleShapeInfo.hxx>
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::accessibility;
+
+using ::com::sun::star::uno::Reference;
+using ::com::sun::star::uno::RuntimeException;
+
+
+namespace chart
+{
+
+AccessibleChartShape::AccessibleChartShape(
+        const AccessibleElementInfo& rAccInfo,
+        bool bMayHaveChildren, bool bAlwaysTransparent )
+    :impl::AccessibleChartShape_Base( rAccInfo, bMayHaveChildren, bAlwaysTransparent )
+    ,m_pAccShape( NULL )
+{
+    if ( rAccInfo.m_aOID.isAdditionalShape() )
+    {
+        Reference< drawing::XShape > xShape( rAccInfo.m_aOID.getAdditionalShape() );
+        Reference< XAccessible > xParent;
+        if ( rAccInfo.m_pParent )
+        {
+            xParent.set( rAccInfo.m_pParent );
+        }
+        sal_Int32 nIndex = -1;
+        if ( rAccInfo.m_spObjectHierarchy )
+        {
+            nIndex = rAccInfo.m_spObjectHierarchy->getIndexInParent( rAccInfo.m_aOID );
+        }
+        ::accessibility::AccessibleShapeInfo aShapeInfo( xShape, xParent, nIndex );
+
+        m_aShapeTreeInfo.SetSdrView( rAccInfo.m_pSdrView );
+        m_aShapeTreeInfo.SetController( NULL );
+        m_aShapeTreeInfo.SetWindow( VCLUnoHelper::GetWindow( rAccInfo.m_xWindow ) );
+        m_aShapeTreeInfo.SetViewForwarder( rAccInfo.m_pViewForwarder );
+
+        ::accessibility::ShapeTypeHandler& rShapeHandler = ::accessibility::ShapeTypeHandler::Instance();
+        m_pAccShape = rShapeHandler.CreateAccessibleObject( aShapeInfo, m_aShapeTreeInfo );
+        if ( m_pAccShape )
+        {
+            m_pAccShape->acquire();
+            m_pAccShape->Init();
+        }
+    }
+}
+
+AccessibleChartShape::~AccessibleChartShape()
+{
+    OSL_ASSERT( CheckDisposeState( false /* don't throw exceptions */ ) );
+
+    if ( m_pAccShape )
+    {
+        m_pAccShape->dispose();
+        m_pAccShape->release();
+    }
+}
+
+// ________ XServiceInfo ________
+::rtl::OUString AccessibleChartShape::getImplementationName()
+    throw (RuntimeException)
+{
+    return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "AccessibleChartShape" ) );
+}
+
+// ________ XAccessibleContext ________
+sal_Int32 AccessibleChartShape::getAccessibleChildCount()
+    throw (RuntimeException)
+{
+    sal_Int32 nCount(0);
+    if ( m_pAccShape )
+    {
+        nCount = m_pAccShape->getAccessibleChildCount();
+    }
+    return nCount;
+}
+
+Reference< XAccessible > AccessibleChartShape::getAccessibleChild( sal_Int32 i )
+    throw (lang::IndexOutOfBoundsException, RuntimeException)
+{
+    Reference< XAccessible > xChild;
+    if ( m_pAccShape )
+    {
+        xChild = m_pAccShape->getAccessibleChild( i );
+    }
+    return xChild;
+}
+
+sal_Int16 AccessibleChartShape::getAccessibleRole()
+    throw (RuntimeException)
+{
+    sal_Int16 nRole(0);
+    if ( m_pAccShape )
+    {
+        nRole = m_pAccShape->getAccessibleRole();
+    }
+    return nRole;
+}
+
+::rtl::OUString AccessibleChartShape::getAccessibleDescription()
+    throw (::com::sun::star::uno::RuntimeException)
+{
+    ::rtl::OUString aDescription;
+    if ( m_pAccShape )
+    {
+        aDescription = m_pAccShape->getAccessibleDescription();
+    }
+    return aDescription;
+}
+
+::rtl::OUString AccessibleChartShape::getAccessibleName()
+    throw (::com::sun::star::uno::RuntimeException)
+{
+    ::rtl::OUString aName;
+    if ( m_pAccShape )
+    {
+        aName = m_pAccShape->getAccessibleName();
+    }
+    return aName;
+}
+
+// ________ XAccessibleComponent ________
+sal_Bool AccessibleChartShape::containsPoint( const awt::Point& aPoint )
+    throw (uno::RuntimeException)
+{
+    sal_Bool bReturn = sal_False;
+    if ( m_pAccShape )
+    {
+        bReturn = m_pAccShape->containsPoint( aPoint );
+    }
+    return bReturn;
+}
+
+Reference< XAccessible > AccessibleChartShape::getAccessibleAtPoint( const awt::Point& aPoint )
+    throw (uno::RuntimeException)
+{
+    Reference< XAccessible > xResult;
+    if ( m_pAccShape )
+    {
+        xResult.set( m_pAccShape->getAccessibleAtPoint( aPoint ) );
+    }
+    return xResult;
+}
+
+awt::Rectangle AccessibleChartShape::getBounds()
+    throw (uno::RuntimeException)
+{
+    awt::Rectangle aBounds;
+    if ( m_pAccShape )
+    {
+        aBounds = m_pAccShape->getBounds();
+    }
+    return aBounds;
+}
+
+awt::Point AccessibleChartShape::getLocation()
+    throw (uno::RuntimeException)
+{
+    awt::Point aLocation;
+    if ( m_pAccShape )
+    {
+        aLocation = m_pAccShape->getLocation();
+    }
+    return aLocation;
+}
+
+awt::Point AccessibleChartShape::getLocationOnScreen()
+    throw (uno::RuntimeException)
+{
+    awt::Point aLocation;
+    if ( m_pAccShape )
+    {
+        aLocation = m_pAccShape->getLocationOnScreen();
+    }
+    return aLocation;
+}
+
+awt::Size AccessibleChartShape::getSize()
+    throw (uno::RuntimeException)
+{
+    awt::Size aSize;
+    if ( m_pAccShape )
+    {
+        aSize = m_pAccShape->getSize();
+    }
+    return aSize;
+}
+
+void AccessibleChartShape::grabFocus()
+    throw (uno::RuntimeException)
+{
+    return AccessibleBase::grabFocus();
+}
+
+sal_Int32 AccessibleChartShape::getForeground()
+    throw (uno::RuntimeException)
+{
+    sal_Int32 nColor(0);
+    if ( m_pAccShape )
+    {
+        nColor = m_pAccShape->getForeground();
+    }
+    return nColor;
+}
+
+sal_Int32 AccessibleChartShape::getBackground()
+    throw (uno::RuntimeException)
+{
+    sal_Int32 nColor(0);
+    if ( m_pAccShape )
+    {
+        nColor = m_pAccShape->getBackground();
+    }
+    return nColor;
+}
+
+// ________ XAccessibleExtendedComponent ________
+Reference< awt::XFont > AccessibleChartShape::getFont()
+    throw (uno::RuntimeException)
+{
+    Reference< awt::XFont > xFont;
+    if ( m_pAccShape )
+    {
+        xFont.set( m_pAccShape->getFont() );
+    }
+    return xFont;
+}
+
+::rtl::OUString AccessibleChartShape::getTitledBorderText()
+    throw (uno::RuntimeException)
+{
+    ::rtl::OUString aText;
+    if ( m_pAccShape )
+    {
+        aText = m_pAccShape->getTitledBorderText();
+    }
+    return aText;
+}
+
+::rtl::OUString AccessibleChartShape::getToolTipText()
+    throw (::com::sun::star::uno::RuntimeException)
+{
+    ::rtl::OUString aText;
+    if ( m_pAccShape )
+    {
+        aText = m_pAccShape->getToolTipText();
+    }
+    return aText;
+}
+
+} // namespace chart

File chart2/source/controller/accessibility/AccessibleChartShape.hxx

+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _CHART2_ACCESSIBLECHARTSHAPE_HXX_
+#define _CHART2_ACCESSIBLECHARTSHAPE_HXX_
+
+#include "AccessibleBase.hxx"
+
+#include <com/sun/star/accessibility/XAccessibleExtendedComponent.hpp>
+#include <cppuhelper/implbase1.hxx>
+#include <svx/AccessibleShapeTreeInfo.hxx>
+
+
+namespace accessibility
+{
+class AccessibleShape;
+}
+
+namespace chart
+{
+
+namespace impl
+{
+typedef ::cppu::ImplInheritanceHelper1<
+    AccessibleBase,
+    ::com::sun::star::accessibility::XAccessibleExtendedComponent > AccessibleChartShape_Base;
+}
+
+class AccessibleChartShape :
+    public impl::AccessibleChartShape_Base
+{
+public:
+    AccessibleChartShape( const AccessibleElementInfo& rAccInfo,
+        bool bMayHaveChildren, bool bAlwaysTransparent = false );
+    virtual ~AccessibleChartShape();
+
+    // ________ XServiceInfo ________
+    virtual ::rtl::OUString SAL_CALL getImplementationName()
+        throw (::com::sun::star::uno::RuntimeException);
+
+    // ________ XAccessibleContext ________
+    virtual sal_Int32 SAL_CALL getAccessibleChildCount()
+        throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
+        getAccessibleChild( sal_Int32 i )
+        throw (::com::sun::star::lang::IndexOutOfBoundsException,
+               ::com::sun::star::uno::RuntimeException);
+    virtual sal_Int16 SAL_CALL getAccessibleRole()
+        throw (::com::sun::star::uno::RuntimeException);
+    virtual ::rtl::OUString SAL_CALL getAccessibleDescription()
+        throw (::com::sun::star::uno::RuntimeException);
+    virtual ::rtl::OUString SAL_CALL getAccessibleName()
+        throw (::com::sun::star::uno::RuntimeException);
+
+    // ________ XAccessibleComponent ________
+    virtual sal_Bool SAL_CALL containsPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::awt::Rectangle SAL_CALL getBounds() throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::awt::Point SAL_CALL getLocation() throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::awt::Point SAL_CALL getLocationOnScreen() throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::awt::Size SAL_CALL getSize() throw (::com::sun::star::uno::RuntimeException);
+    virtual void SAL_CALL grabFocus() throw (::com::sun::star::uno::RuntimeException);
+    virtual sal_Int32 SAL_CALL getForeground() throw (::com::sun::star::uno::RuntimeException);
+    virtual sal_Int32 SAL_CALL getBackground() throw (::com::sun::star::uno::RuntimeException);
+
+    // ________ XAccessibleExtendedComponent ________
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont > SAL_CALL getFont()
+        throw (::com::sun::star::uno::RuntimeException);
+    virtual ::rtl::OUString SAL_CALL getTitledBorderText()
+        throw (::com::sun::star::uno::RuntimeException);
+    virtual ::rtl::OUString SAL_CALL getToolTipText()
+        throw (::com::sun::star::uno::RuntimeException);
+
+private:
+    ::accessibility::AccessibleShape* m_pAccShape;
+    ::accessibility::AccessibleShapeTreeInfo m_aShapeTreeInfo;
+};
+
+}  // namespace chart
+
+#endif

File chart2/source/controller/accessibility/AccessibleChartView.cxx

 #include "ObjectIdentifier.hxx"
 #include "ResId.hxx"
 #include "Strings.hrc"
+#include "AccessibleViewForwarder.hxx"
 
 #include <com/sun/star/accessibility/AccessibleEventId.hpp>
 #include <com/sun/star/accessibility/AccessibleStateType.hpp>
 //.............................................................................
 
 AccessibleChartView::AccessibleChartView(
-    const Reference<uno::XComponentContext> & xContext ) :
+    const Reference< uno::XComponentContext >& xContext, SdrView* pView ) :
         impl::AccessibleChartView_Base(
             AccessibleElementInfo(), // empty for now
             true, // has children
             true  // always transparent
             ),
-        m_xContext( xContext )
+        m_xContext( xContext ),
+        m_pSdrView( pView ),
+        m_pViewForwarder( NULL )
 {
     AddState( AccessibleStateType::OPAQUE );
 }
 
 AccessibleChartView::~AccessibleChartView()
 {
+    delete m_pViewForwarder;
 }
 
 
 }
 
 //-----------------------------------------------------------------
-// lang::XServiceInfo
-//-----------------------------------------------------------------
-
-APPHELPER_XSERVICEINFO_IMPL( AccessibleChartView, CHART2_ACCESSIBLE_SERVICE_IMPLEMENTATION_NAME )
-
-uno::Sequence< rtl::OUString > AccessibleChartView::getSupportedServiceNames_Static()
-{
-    uno::Sequence< rtl::OUString > aSNS( 2 );
-    aSNS.getArray()[ 0 ] = C2U("com.sun.star.accessibility.Accessible");
-    aSNS.getArray()[ 1 ] = CHART2_ACCESSIBLE_SERVICE_NAME;
-    return aSNS;
-}
-
-//-----------------------------------------------------------------
 // lang::XInitialization
 //-----------------------------------------------------------------
 
 
         {
             AccessibleElementInfo aAccInfo;
-            aAccInfo.m_aCID = C2U("ROOT");
+            aAccInfo.m_aOID = ObjectIdentifier( C2U( "ROOT" ) );
             aAccInfo.m_xChartDocument = uno::WeakReference< chart2::XChartDocument >(
                 uno::Reference< chart2::XChartDocument >( m_xChartModel.get(), uno::UNO_QUERY ));
             aAccInfo.m_xSelectionSupplier = m_xSelectionSupplier;
             aAccInfo.m_xWindow = m_xWindow;
             aAccInfo.m_pParent = 0;
             aAccInfo.m_spObjectHierarchy = m_spObjectHierarchy;
+            aAccInfo.m_pSdrView = m_pSdrView;
+            Window* pWindow = VCLUnoHelper::GetWindow( m_xWindow );
+            if ( m_pViewForwarder )
+            {
+                delete m_pViewForwarder;
+            }
+            m_pViewForwarder = new AccessibleViewForwarder( this, pWindow );
+            aAccInfo.m_pViewForwarder = m_pViewForwarder;
             // broadcasts an INVALIDATE_ALL_CHILDREN event globally
             SetInfo( aAccInfo );
         }
 
     if( xSelectionSupplier.is() )
     {
-        rtl::OUString aSelectedObjectCID;
-        Any aSelection = xSelectionSupplier->getSelection();
-        if(aSelection>>=aSelectedObjectCID)
+        ObjectIdentifier aSelectedOID( xSelectionSupplier->getSelection() );
+        if ( m_aCurrentSelectionOID.isValid() )
         {
-            if( m_aCurrentSelectionCID.getLength())
-                NotifyEvent( LOST_SELECTION, m_aCurrentSelectionCID );
-            if( aSelectedObjectCID.getLength())
-                NotifyEvent( GOT_SELECTION, aSelectedObjectCID );
-            m_aCurrentSelectionCID = aSelectedObjectCID;
+            NotifyEvent( LOST_SELECTION, m_aCurrentSelectionOID );
         }
+        if( aSelectedOID.isValid() )
+        {
+            NotifyEvent( GOT_SELECTION, aSelectedOID );
+        }
+        m_aCurrentSelectionOID = aSelectedOID;
     }
 }
 

File chart2/source/controller/accessibility/AccessibleViewForwarder.cxx

+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_chart2.hxx"
+
+#include "AccessibleViewForwarder.hxx"
+#include "AccessibleChartView.hxx"
+
+#include <vcl/window.hxx>
+
+using namespace ::com::sun::star;
+
+
+namespace chart
+{
+
+AccessibleViewForwarder::AccessibleViewForwarder( AccessibleChartView* pAccChartView, Window* pWindow )
+    :m_pAccChartView( pAccChartView )
+    ,m_pWindow( pWindow )
+    ,m_aMapMode( MAP_100TH_MM )
+{
+}
+
+AccessibleViewForwarder::~AccessibleViewForwarder()
+{
+}
+
+// ________ IAccessibleViewforwarder ________
+
+BOOL AccessibleViewForwarder::IsValid() const
+{
+    return sal_True;
+}
+
+Rectangle AccessibleViewForwarder::GetVisibleArea() const
+{
+    Rectangle aVisibleArea;
+    if ( m_pWindow )
+    {
+        aVisibleArea.SetPos( Point( 0, 0 ) );
+        aVisibleArea.SetSize( m_pWindow->GetOutputSizePixel() );
+        aVisibleArea = m_pWindow->PixelToLogic( aVisibleArea, m_aMapMode );
+    }
+    return aVisibleArea;
+}
+
+Point AccessibleViewForwarder::LogicToPixel( const Point& rPoint ) const
+{
+    Point aPoint;
+    if ( m_pAccChartView && m_pWindow )
+    {
+        awt::Point aLocation = m_pAccChartView->getLocationOnScreen();
+        Point aTopLeft( aLocation.X, aLocation.Y );
+        aPoint = m_pWindow->LogicToPixel( rPoint, m_aMapMode ) + aTopLeft;
+    }
+    return aPoint;
+}
+
+Size AccessibleViewForwarder::LogicToPixel( const Size& rSize ) const
+{
+    Size aSize;
+    if ( m_pWindow )
+    {
+        aSize = m_pWindow->LogicToPixel( rSize, m_aMapMode );
+    }
+    return aSize;
+}
+
+Point AccessibleViewForwarder::PixelToLogic( const Point& rPoint ) const
+{
+    Point aPoint;
+    if ( m_pAccChartView && m_pWindow )
+    {
+        awt::Point aLocation = m_pAccChartView->getLocationOnScreen();
+        Point aTopLeft( aLocation.X, aLocation.Y );
+        aPoint = m_pWindow->PixelToLogic( rPoint - aTopLeft, m_aMapMode );
+    }
+    return aPoint;
+}
+
+Size AccessibleViewForwarder::PixelToLogic( const Size& rSize ) const
+{
+    Size aSize;
+    if ( m_pWindow )
+    {
+        aSize = m_pWindow->PixelToLogic( rSize, m_aMapMode );
+    }
+    return aSize;
+}
+
+} // namespace chart

File chart2/source/controller/accessibility/AccessibleViewForwarder.hxx

+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _CHART2_ACCESSIBLEVIEWFORWARDER_HXX_
+#define _CHART2_ACCESSIBLEVIEWFORWARDER_HXX_
+
+#include <vcl/mapmod.hxx>
+#include <svx/IAccessibleViewForwarder.hxx>
+
+class Window;
+
+namespace chart
+{
+
+class AccessibleChartView;
+
+class AccessibleViewForwarder : public ::accessibility::IAccessibleViewForwarder
+{
+public:
+    AccessibleViewForwarder( AccessibleChartView* pAccChartView, Window* pWindow );
+    virtual ~AccessibleViewForwarder();
+    
+    // ________ IAccessibleViewforwarder ________
+    virtual BOOL IsValid() const;
+    virtual Rectangle GetVisibleArea() const;
+    virtual Point LogicToPixel( const Point& rPoint ) const;
+    virtual Size LogicToPixel( const Size& rSize ) const;
+    virtual Point PixelToLogic( const Point& rPoint ) const;
+    virtual Size PixelToLogic( const Size& rSize ) const;
+
+private:
+    AccessibleViewForwarder( AccessibleViewForwarder& );
+    AccessibleViewForwarder& operator=( AccessibleViewForwarder& );
+
+    AccessibleChartView* m_pAccChartView;
+    Window* m_pWindow;
+    MapMode m_aMapMode;
+};
+
+}  // namespace chart
+
+#endif

File chart2/source/controller/accessibility/ChartElementFactory.cxx

 
 #include "ChartElementFactory.hxx"
 #include "ObjectIdentifier.hxx"
-
 #include "AccessibleChartElement.hxx"
 
 namespace chart
 
 AccessibleBase* ChartElementFactory::CreateChartElement( const AccessibleElementInfo& rAccInfo )
 {
-    ObjectType eType(
-        ObjectIdentifier::getObjectType( rAccInfo.m_aCID ));
+    ObjectIdentifier aOID( rAccInfo.m_aOID );
+    ObjectType eType( aOID.getObjectType() );
 
     switch( eType )
     {
             return new AccessibleChartElement( rAccInfo, true, false );
         case OBJECTTYPE_UNKNOWN:
             break;
+        default:
+            break;
     }
 
     return 0;

File chart2/source/controller/accessibility/makefile.mk

 			$(SLO)$/ChartElementFactory.obj		\
 			$(SLO)$/AccessibleBase.obj	\
 			$(SLO)$/AccessibleChartElement.obj \
-			$(SLO)$/AccessibleTextHelper.obj
+			$(SLO)$/AccessibleChartShape.obj \
+			$(SLO)$/AccessibleTextHelper.obj \
+			$(SLO)$/AccessibleViewForwarder.obj
 
 # --- Targets -----------------------------------------------------------------
 

File chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx

 #include "WrappedAddInProperty.hxx"
 #include "WrappedIgnoreProperty.hxx"
 #include "ChartRenderer.hxx"
+#include "UndoManager.hxx"
 #include <com/sun/star/chart2/XTitled.hpp>
 #include <com/sun/star/chart2/data/XDataReceiver.hpp>
 #include <com/sun/star/chart/ChartDataRowSource.hpp>
         xResult.set( m_xChartView );
         bServiceFound = true;
     }
+    else if ( aServiceSpecifier.equals( CHART_UNDOMANAGER_SERVICE_NAME ) )
+    {
+        Reference< chart2::XUndoManager > xUndoManager( new UndoManager() );
+        xResult.set( xUndoManager );
+        bServiceFound = true;
+    }
     else
     {
         // try to create a shape

File chart2/source/controller/dialogs/ResourceIds.hrc

 #define DLG_SPLINE_PROPERTIES 904
 #define DLG_DATA_TRENDLINE  841
 #define DLG_DATA_YERRORBAR  842
+#define DLG_SHAPE_FONT      921
+#define DLG_SHAPE_PARAGRAPH 922
 
 //-----------------------------------------------------------------------------
 //TabPage Ids:

File chart2/source/controller/dialogs/Strings.src

 	Text [ en-US ] = "Chart Floor" ;
 };
 
+String STR_OBJECT_SHAPE
+{
+	Text [ en-US ] = "Drawing Object" ;
+};
+
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------

File chart2/source/controller/dialogs/dlg_ObjectProperties.cxx

                     SchAlignmentTabPage::CreateWithoutRotation can be deleted. */
                 AddTabPage(TP_ALIGNMENT, String(SchResId(STR_PAGE_ALIGNMENT)), SchAlignmentTabPage::CreateWithoutRotation, NULL);
             break;
+        default:
+            break;
     }
 
     // used to find out if user left the dialog with OK. When OK is pressed but

File chart2/source/controller/dialogs/dlg_ShapeFont.cxx

+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_chart2.hxx"
+
+#include "dlg_ShapeFont.hxx"
+#include "ViewElementListProvider.hxx"
+#include "ResId.hxx"
+#include "ResourceIds.hrc"
+
+#include <svl/intitem.hxx>
+#include <sfx2/objsh.hxx>
+#include <svx/dialogs.hrc>
+#include <svx/flagsdef.hxx>
+#include <editeng/flstitem.hxx>
+
+using ::com::sun::star::uno::Reference;
+using namespace ::com::sun::star;
+
+//.............................................................................
+namespace chart
+{
+//.............................................................................
+
+ShapeFontDialog::ShapeFontDialog( Window* pParent, const SfxItemSet* pAttr,
+    const ViewElementListProvider* pViewElementListProvider )
+    :SfxTabDialog( pParent, SchResId( DLG_SHAPE_FONT ), pAttr )
+    ,m_pViewElementListProvider( pViewElementListProvider )
+{
+    FreeResource();
+
+    AddTabPage( RID_SVXPAGE_CHAR_NAME );
+    AddTabPage( RID_SVXPAGE_CHAR_EFFECTS );
+    AddTabPage( RID_SVXPAGE_CHAR_POSITION );
+}
+
+ShapeFontDialog::~ShapeFontDialog()
+{
+}
+
+void ShapeFontDialog::PageCreated( USHORT nId, SfxTabPage& rPage )
+{
+    SfxAllItemSet aSet( *( GetInputSetImpl()->GetPool() ) );
+    switch ( nId )
+    {
+        case RID_SVXPAGE_CHAR_NAME:
+            {
+                aSet.Put( SvxFontListItem( m_pViewElementListProvider->getFontList(), SID_ATTR_CHAR_FONTLIST ) );
+                rPage.PageCreated( aSet );
+            }
+            break;
+        case RID_SVXPAGE_CHAR_EFFECTS:
+            {
+                aSet.Put( SfxUInt16Item( SID_DISABLE_CTL, DISABLE_CASEMAP ) );
+                rPage.PageCreated( aSet );
+            }
+            break;
+        default:
+            {
+            }
+            break;
+	}
+}
+
+//.............................................................................
+} //namespace chart
+//.............................................................................

File chart2/source/controller/dialogs/dlg_ShapeFont.src

+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "ResourceIds.hrc"
+#include <svx/dialogs.hrc>
+
+TabDialog DLG_SHAPE_FONT
+{
+    OutputSize = TRUE ;
+    SVLook = TRUE ;
+    Size = MAP_APPFONT ( 289 , 176 ) ;
+    Text [ en-US ] = "Character" ;
+    Moveable = TRUE ;
+    Closeable = TRUE ;
+    TabControl 1
+    {
+        OutputSize = TRUE ;
+        Pos = MAP_APPFONT ( 3 , 3 ) ;
+        Size = MAP_APPFONT ( 260 , 135 ) ;
+        PageList =
+        {
+            PageItem
+            {
+                Identifier = RID_SVXPAGE_CHAR_NAME ;
+                Text [ en-US ] = "Font";
+            };
+            PageItem
+            {
+                Identifier = RID_SVXPAGE_CHAR_EFFECTS ;
+                Text [ en-US ] = "Font Effects";
+            };
+            PageItem
+            {
+                Identifier = RID_SVXPAGE_CHAR_POSITION ;
+                Text [ en-US ] = "Font Position";
+            };
+        };
+    };
+};

File chart2/source/controller/dialogs/dlg_ShapeParagraph.cxx

+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_chart2.hxx"
+
+#include "dlg_ShapeParagraph.hxx"
+#include "ResId.hxx"
+#include "ResourceIds.hrc"
+
+#include <svl/cjkoptions.hxx>
+#include <svl/intitem.hxx>
+#include <svx/dialogs.hrc>
+#include <svx/flagsdef.hxx>
+
+using ::com::sun::star::uno::Reference;
+using namespace ::com::sun::star;
+
+//.............................................................................
+namespace chart
+{
+//.............................................................................
+
+ShapeParagraphDialog::ShapeParagraphDialog( Window* pParent, const SfxItemSet* pAttr )
+    :SfxTabDialog( pParent, SchResId( DLG_SHAPE_PARAGRAPH ), pAttr )
+{
+    FreeResource();
+
+    SvtCJKOptions aCJKOptions;
+
+    AddTabPage( RID_SVXPAGE_STD_PARAGRAPH );
+    AddTabPage( RID_SVXPAGE_ALIGN_PARAGRAPH );
+    if ( aCJKOptions.IsAsianTypographyEnabled() )
+    {
+        AddTabPage( RID_SVXPAGE_PARA_ASIAN );
+    }
+    else
+    {
+        RemoveTabPage( RID_SVXPAGE_PARA_ASIAN );
+    }
+    AddTabPage( RID_SVXPAGE_TABULATOR );
+}
+
+ShapeParagraphDialog::~ShapeParagraphDialog()
+{
+}
+
+void ShapeParagraphDialog::PageCreated( USHORT nId, SfxTabPage& rPage )
+{
+    SfxAllItemSet aSet( *( GetInputSetImpl()->GetPool() ) );
+    switch ( nId )
+    {
+        case RID_SVXPAGE_TABULATOR:
+            {
+                aSet.Put( SfxUInt16Item( SID_SVXTABULATORTABPAGE_CONTROLFLAGS,
+                    ( TABTYPE_ALL &~TABTYPE_LEFT ) | ( TABFILL_ALL &~TABFILL_NONE ) ) );
+                rPage.PageCreated( aSet );
+            }
+            break;
+        default:
+            {
+            }
+            break;
+    }
+}
+
+//.............................................................................
+} //namespace chart
+//.............................................................................

File chart2/source/controller/dialogs/dlg_ShapeParagraph.src

+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "ResourceIds.hrc"
+#include <svx/dialogs.hrc>
+
+TabDialog DLG_SHAPE_PARAGRAPH
+{
+    OutputSize = TRUE ;
+    SVLook = TRUE ;
+    Size = MAP_APPFONT ( 289 , 176 ) ;
+    Text [ en-US ] = "Paragraph" ;
+    Moveable = TRUE ;
+    Closeable = TRUE ;
+    TabControl 1
+    {
+        OutputSize = TRUE ;
+        Pos = MAP_APPFONT ( 3 , 3 ) ;
+        Size = MAP_APPFONT ( 260 , 135 ) ;
+        PageList =
+        {
+            PageItem
+            {
+                Identifier = RID_SVXPAGE_STD_PARAGRAPH ;
+                Text [ en-US ] = "Indents & Spacing";
+            };
+            PageItem
+            {
+                Identifier = RID_SVXPAGE_ALIGN_PARAGRAPH ;
+                Text [ en-US ] = "Alignment";
+            };
+            PageItem
+            {
+                Identifier = RID_SVXPAGE_PARA_ASIAN ;
+                Text [ en-US ] = "Asian Typography";
+            };
+            PageItem
+            {
+                Identifier = RID_SVXPAGE_TABULATOR ;
+                Text [ en-US ] = "Tab";
+            };
+        };
+    };
+};

File chart2/source/controller/dialogs/makefile.mk

                 $(SLO)$/dlg_ChartType_UNO.obj \
                 $(SLO)$/dlg_ChartType.obj \
                 $(SLO)$/dlg_NumberFormat.obj \
+                $(SLO)$/dlg_ShapeFont.obj \
+                $(SLO)$/dlg_ShapeParagraph.obj \
                 $(SLO)$/RangeSelectionButton.obj \
                 $(SLO)$/RangeSelectionHelper.obj \
                 $(SLO)$/RangeSelectionListener.obj \
                 dlg_InsertErrorBars.src \
                 dlg_InsertTitle.src \
                 dlg_ChartType.src \
-                dlg_CreationWizard.src
+                dlg_CreationWizard.src \
+                dlg_ShapeFont.src \
+                dlg_ShapeParagraph.src
 
 SRS1NAME=$(TARGET)
 

File chart2/source/controller/drawinglayer/DrawViewWrapper.cxx

 #include "chartview/DrawModelWrapper.hxx"
 #include "ConfigurationAccess.hxx"
 
+#include <unotools/lingucfg.hxx>
+#include <editeng/langitem.hxx>
 // header for class SdrPage
 #include <svx/svdpage.hxx>
 //header for class SdrPageView
 
 // header for class SvxShape
 #include <svx/unoshape.hxx>
+#include <editeng/fhgtitem.hxx>
 
 #include <com/sun/star/container/XChild.hpp>
 #include <com/sun/star/lang/XUnoTunnel.hpp>
 
     SetPagePaintingAllowed(bPaintPageForEditMode);
 
+    // #i12587# support for shapes in chart
+    SdrOutliner* pOutliner = getOutliner();
+    SfxItemPool* pOutlinerPool = ( pOutliner ? pOutliner->GetEditTextObjectPool() : NULL );
+    if ( pOutlinerPool )
+    {
+        SvtLinguConfig aLinguConfig;
+        SvtLinguOptions aLinguOptions;
+        if ( aLinguConfig.GetOptions( aLinguOptions ) )
+        {
+            pOutlinerPool->SetPoolDefaultItem( SvxLanguageItem( aLinguOptions.nDefaultLanguage, EE_CHAR_LANGUAGE ) );
+            pOutlinerPool->SetPoolDefaultItem( SvxLanguageItem( aLinguOptions.nDefaultLanguage_CJK, EE_CHAR_LANGUAGE_CJK ) );
+            pOutlinerPool->SetPoolDefaultItem( SvxLanguageItem( aLinguOptions.nDefaultLanguage_CTL, EE_CHAR_LANGUAGE_CTL ) );
+        }
+
+        // set font height without changing SdrEngineDefaults
+        pOutlinerPool->SetPoolDefaultItem( SvxFontHeightItem( 423, 100, EE_CHAR_FONTHEIGHT ) );  // 12pt
+    }
+
     ReInit();
 }
 

File chart2/source/controller/inc/AccessibleBase.hxx

 #ifndef _CHART2_ACCESSIBLEBASE_HXX_
 #define _CHART2_ACCESSIBLEBASE_HXX_
 
+#include "ObjectIdentifier.hxx"
+
 #include <com/sun/star/chart2/XChartDocument.hpp>
 #include <com/sun/star/accessibility/XAccessible.hpp>
 #include <com/sun/star/accessibility/XAccessibleContext.hpp>
 
 class SfxItemSet;
 class SdrObject;
+class SdrView;
+
+namespace accessibility
+{
+class IAccessibleViewForwarder;
+}
 
 namespace chart
 {
 class AccessibleBase;
 class ObjectHierarchy;
 
-typedef rtl::OUString AccessibleUniqueId;
+typedef ObjectIdentifier AccessibleUniqueId;
 
 struct AccessibleElementInfo
 {
-    AccessibleUniqueId m_aCID;
+    AccessibleUniqueId m_aOID;
 
     ::com::sun::star::uno::WeakReference<
             ::com::sun::star::chart2::XChartDocument > m_xChartDocument;
     ::boost::shared_ptr< ObjectHierarchy > m_spObjectHierarchy;
 
     AccessibleBase * m_pParent;
+    SdrView* m_pSdrView;
+    ::accessibility::IAccessibleViewForwarder* m_pViewForwarder;
 };
 
 
         greater than the index of the removed element get an index one less than
         before.
      */
-    void         RemoveChildById( const ::rtl::OUString & rId );
+    void         RemoveChildByOId( const ObjectIdentifier& rOId );
 
     /** Retrieve the pixel coordinates of logical coordinates (0,0) of the
         current logic coordinate system.  This can be used for
     /** type of the hash containing a vector index for every AccessibleUniqueId
         of the object in the child list
      */
-    typedef ::std::map< ::rtl::OUString, tAccessible > ChildCIDMap;
+    typedef ::std::map< ObjectIdentifier, tAccessible > ChildOIDMap;
 
     bool                                  m_bIsDisposed;
     const bool                            m_bMayHaveChildren;
     bool                                  m_bChildrenInitialized;
     ChildListVectorType                   m_aChildList;
 
-    ChildCIDMap                           m_aChildCIDMap;
+    ChildOIDMap                           m_aChildOIDMap;
 
     ::comphelper::AccessibleEventNotifier::TClientId      m_nEventNotifierId;
 

File chart2/source/controller/inc/AccessibleChartView.hxx

 
 #include <boost/shared_ptr.hpp>
 
+namespace accessibility
+{
+class IAccessibleViewForwarder;
+}
+
 //.............................................................................
 namespace chart
 {
 //.............................................................................
 
 class ExplicitValueProvider;
-class ObjectHierarchy;
 
 namespace impl
 {
 public:
     AccessibleChartView(
         const ::com::sun::star::uno::Reference<
-            ::com::sun::star::uno::XComponentContext > & xContext );
+            ::com::sun::star::uno::XComponentContext >& xContext, SdrView* pView );
     virtual ~AccessibleChartView();
 
-    // ____ lang::XServiceInfo ____
-    APPHELPER_XSERVICEINFO_DECL()
-    APPHELPER_SERVICE_FACTORY_HELPER( AccessibleChartView )
-
-protected:
     // ____ WeakComponentHelper (called from XComponent::dispose()) ____
     virtual void SAL_CALL disposing();
 
     virtual ::com::sun::star::awt::Rectangle SAL_CALL getBounds() throw (::com::sun::star::uno::RuntimeException);
     virtual ::com::sun::star::awt::Point SAL_CALL getLocationOnScreen() throw (::com::sun::star::uno::RuntimeException);
 
+protected:
     // ________ AccessibleChartElement ________
     virtual ::com::sun::star::awt::Point   GetUpperLeftOnScreen() const;
 
                        ::com::sun::star::accessibility::XAccessible > m_xParent;
 
     ::boost::shared_ptr< ObjectHierarchy >                          m_spObjectHierarchy;
-    AccessibleUniqueId                                              m_aCurrentSelectionCID;
+    AccessibleUniqueId                                              m_aCurrentSelectionOID;
+    SdrView*                                                        m_pSdrView;
+    ::accessibility::IAccessibleViewForwarder*                      m_pViewForwarder;
 
     //no default constructor
     AccessibleChartView();

File chart2/source/controller/inc/MenuResIds.hrc

+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef CHART_MENURESIDS_HRC
+#define CHART_MENURESIDS_HRC
+
+#ifndef _SOLAR_HRC
+#include <svl/solar.hrc>
+#endif
+
+//-----------------------------------------------------------------------------
+// context menus
+
+#define RID_CONTEXTMENU_SHAPE       (RID_APP_START + 1)
+#define RID_CONTEXTMENU_SHAPEEDIT   (RID_APP_START + 2)
+
+// CHART_MENURESIDS_HRC
+#endif

File chart2/source/controller/inc/ObjectHierarchy.hxx

 #ifndef CHART2_OBJECTHIERARCHY_HXX
 #define CHART2_OBJECTHIERARCHY_HXX