Anonymous avatar Anonymous committed 15782eb

chartshapes: #i12587# line styles are not saved

Comments (0)

Files changed (3)

chart2/source/inc/chartview/DrawModelWrapper.hxx

 		getUnoModel();
     SdrModel& getSdrModel();
 
-    SAL_DLLPRIVATE void updateTablesFromChartModel( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel );
-
     XColorTable*    GetColorTable() const;
     XDashList*      GetDashList() const;
     XLineEndList*   GetLineEndList() const;

chart2/source/view/main/ChartView.cxx

                 // /--
                 ::vos::OGuard aSolarGuard( Application::GetSolarMutex());
                 m_pDrawModelWrapper->lockControllers();
-                m_pDrawModelWrapper->updateTablesFromChartModel( m_xChartModel );
                 // \--
             }
 

chart2/source/view/main/DrawModelWrapper.cxx

     return 0;
 }
 
-namespace
-{
-    void impl_addOrExchangeElements( const uno::Reference< uno::XInterface >& xSource
-        , const uno::Reference< uno::XInterface >& xTarget )
-    {
-        uno::Reference< container::XNameContainer > xSourceContainer( xSource, uno::UNO_QUERY );
-        uno::Reference< container::XNameContainer > xTargetContainer( xTarget, uno::UNO_QUERY );
-
-        if(!xSourceContainer.is()||!xTargetContainer.is())
-            return;
-
-        try
-        {
-            //put each element of xSourceContainer to xTargetContainer
-            uno::Sequence< rtl::OUString > aNames( xSourceContainer->getElementNames() );
-            for( sal_Int32 nN = aNames.getLength(); nN--; )
-            {
-                rtl::OUString aName(aNames[nN]);
-                uno::Any aNewValue( xSourceContainer->getByName( aName ) );
-                if( xTargetContainer->hasByName(aName) )
-                {
-                    uno::Any aOldValue( xTargetContainer->getByName( aName ) );
-                    if( aOldValue != aNewValue )
-                        xTargetContainer->replaceByName(aName,aNewValue);
-                }
-                else
-                    xTargetContainer->insertByName( aName, aNewValue );
-            }
-        }
-        catch( const uno::Exception & ex )
-        {
-            ASSERT_EXCEPTION( ex );
-        }
-    }
-}
-
-void DrawModelWrapper::updateTablesFromChartModel( const uno::Reference< frame::XModel >& xChartModel )
-{
-    //all gradients, etc contained in the model need to be offered fot the view and GUI also:
-
-    DBG_ASSERT( xChartModel.is(),"need a chart model for updateTablesFromChartModel");
-    if( !xChartModel.is() )
-        return;
-
-    uno::Reference< lang::XMultiServiceFactory > xTableFactory( xChartModel, uno::UNO_QUERY );
-    DBG_ASSERT( xTableFactory.is(), "new model is expected to implement service factory for gradient table etc" );
-    if( !xTableFactory.is()  )
-        return;
-
-    //todo? colorTable...
-    //impl_addOrExchangeElements( xTableFactory->createInstance( C2U("com.sun.star.drawing.XXX") )
-    //                          , SvxUnoXColorTable_createInstance( this->GetColorTable() ) );
-    impl_addOrExchangeElements( xTableFactory->createInstance( C2U("com.sun.star.drawing.DashTable") )
-                              , SvxUnoXDashTable_createInstance( this->GetDashList() ) );
-    impl_addOrExchangeElements( xTableFactory->createInstance( C2U("com.sun.star.drawing.MarkerTable") )
-                              , SvxUnoXLineEndTable_createInstance( this->GetLineEndList() ) );
-    impl_addOrExchangeElements( xTableFactory->createInstance( C2U("com.sun.star.drawing.GradientTable") )
-                              , SvxUnoXGradientTable_createInstance( this->GetGradientList() ) );
-    impl_addOrExchangeElements( xTableFactory->createInstance( C2U("com.sun.star.drawing.HatchTable") )
-                              , SvxUnoXHatchTable_createInstance( this->GetHatchList() ) );
-    impl_addOrExchangeElements( xTableFactory->createInstance( C2U("com.sun.star.drawing.BitmapTable") )
-                              , SvxUnoXBitmapTable_createInstance( this->GetBitmapList() ) );
-
-    // transparency gradients
-    uno::Reference< uno::XInterface > xSource(
-        xTableFactory->createInstance( C2U("com.sun.star.drawing.TransparencyGradientTable")));
-    uno::Reference< uno::XInterface > xTarget(
-        this->getShapeFactory()->createInstance( C2U("com.sun.star.drawing.TransparencyGradientTable")));
-    impl_addOrExchangeElements( xSource, xTarget );
-}
-
 //static
 bool DrawModelWrapper::removeShape( const uno::Reference< drawing::XShape >& xShape )
 {
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.