Commits

Anonymous committed 0654a3f

#i12587# Inserting/Editing arbitrary text objects in chart

Comments (0)

Files changed (3)

chart2/source/controller/main/ElementSelector.cxx

 {
 }
 
-void lcl_addObjectsToList( const ObjectHierarchy& rHierarchy, const ObjectHierarchy::tCID & rParent, std::vector< ListBoxEntryData >& rEntries
+void lcl_addObjectsToList( const ObjectHierarchy& rHierarchy, const ObjectHierarchy::tOID & rParent, std::vector< ListBoxEntryData >& rEntries
                           , const sal_Int32 nHierarchyDepth, const Reference< chart2::XChartDocument >& xChartDoc )
 {
     ObjectHierarchy::tChildContainer aChildren( rHierarchy.getChildren(rParent) );
     ObjectHierarchy::tChildContainer::const_iterator aIt( aChildren.begin());
     while( aIt != aChildren.end() )
     {
-        ::rtl::OUString aCID = *aIt;
+        ObjectHierarchy::tOID aOID = *aIt;
+        ::rtl::OUString aCID = aOID.getObjectCID();
         ListBoxEntryData aEntry;
         aEntry.CID = aCID;
         aEntry.UIName += ObjectNameProvider::getNameForCID( aCID, xChartDoc );
         aEntry.nHierarchyDepth = nHierarchyDepth;
         rEntries.push_back(aEntry);
-        lcl_addObjectsToList( rHierarchy, aCID, rEntries, nHierarchyDepth+1, xChartDoc );
+        lcl_addObjectsToList( rHierarchy, aOID, rEntries, nHierarchyDepth+1, xChartDoc );
         ++aIt;
     }
 }
     if( xChartController.is() )
     {
         Reference< view::XSelectionSupplier > xSelectionSupplier( xChartController, uno::UNO_QUERY);
+        ObjectHierarchy::tOID aSelectedOID;
         rtl::OUString aSelectedCID;
         if( xSelectionSupplier.is() )
-            xSelectionSupplier->getSelection() >>= aSelectedCID;
+        {
+            aSelectedOID = ObjectIdentifier( xSelectionSupplier->getSelection() );
+            aSelectedCID = aSelectedOID.getObjectCID();
+        }
                 
         Reference< chart2::XChartDocument > xChartDoc( xChartController->getModel(), uno::UNO_QUERY );
-        ObjectType eType( ObjectIdentifier::getObjectType( aSelectedCID ));
+        ObjectType eType( ObjectIdentifier::getObjectType( aSelectedOID.getObjectCID() ));
         bool bAddSelectionToList = false;
         if( eType == OBJECTTYPE_DATA_POINT || eType == OBJECTTYPE_DATA_LABEL )
             bAddSelectionToList = true;
 	        xChartView = xFact->createInstance( CHART_VIEW_SERVICE_NAME );
         ExplicitValueProvider* pExplicitValueProvider = 0;//ExplicitValueProvider::getExplicitValueProvider(xChartView); dies erzeugt alle sichtbaren datenpinkte, das ist zu viel
         ObjectHierarchy aHierarchy( xChartDoc, pExplicitValueProvider, true /*bFlattenDiagram*/, true /*bOrderingForElementSelector*/ );
-        lcl_addObjectsToList( aHierarchy, aHierarchy.getRootNodeCID(), m_aEntries, 0, xChartDoc );
+        lcl_addObjectsToList( aHierarchy, aHierarchy.getRootNodeOID(), m_aEntries, 0, xChartDoc );
 
         std::vector< ListBoxEntryData >::iterator aIt( m_aEntries.begin() );
         if( bAddSelectionToList )

chart2/source/controller/main/ObjectHierarchy.cxx

                         rtl::OUString aChildParticle( ObjectIdentifier::getStringForType( OBJECTTYPE_DATA_LABELS ) );
                         aChildParticle+=(C2U("="));
                         aSeriesSubContainer.push_back(
-                                    ObjectIdetnifier( ObjectIdentifier::createClassifiedIdentifierForParticles( aSeriesParticle, aChildParticle ) ) );
+                                    ObjectIdentifier( ObjectIdentifier::createClassifiedIdentifierForParticles( aSeriesParticle, aChildParticle ) ) );
                     }
 
                     // Statistics

chart2/source/controller/main/ShapeToolbarController.cxx

 		aFind->second = Event.IsEnabled;
 		if ( m_pToolbarController.is() )
 		{
-            sal_Bool bSetCheckmark = sal_False;
 	        sal_Bool bCheckmark = sal_False;
             ToolBox& rTb = m_pToolbarController->GetToolBox();