[Libreoffice-commits] core.git: Branch 'feature/chart_opengl_window' - 2 commits - chart2/source sc/source

Zolnai Tamás tamas.zolnai at collabora.com
Mon Aug 11 06:02:57 PDT 2014


 chart2/source/view/charttypes/GL3DBarChart.cxx |    5 +--
 sc/source/ui/inc/tabvwsh.hxx                   |    3 --
 sc/source/ui/view/tabvwsh4.cxx                 |   33 -------------------------
 sc/source/ui/view/tabvwshb.cxx                 |    5 ---
 4 files changed, 2 insertions(+), 44 deletions(-)

New commits:
commit d90080effd2a19bfc4a8af43e4ffa2b077013bcf
Author: Zolnai Tamás <tamas.zolnai at collabora.com>
Date:   Mon Aug 11 14:27:16 2014 +0200

    This OpenGL window is useless
    
    Change-Id: Ied9914c9a317dc3945c29b984d2a68957275fc52

diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index 548c6ae..77252e1 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -189,8 +189,6 @@ private:
     void          DoReadUserDataSequence( const ::com::sun::star::uno::Sequence<
                                      ::com::sun::star::beans::PropertyValue >& rSettings );
 
-    void AddOpenGLChartWindows();
-
     DECL_LINK( SimpleRefClose, void* );
     DECL_LINK( SimpleRefDone, OUString* );
     DECL_LINK( SimpleRefAborted, OUString* );
@@ -329,7 +327,6 @@ public:
     ObjectSelectionType GetCurObjectSelectionType() { return eCurOST; }
 
     virtual ErrCode DoVerb(long nVerb) SAL_OVERRIDE;
-    virtual void Initialize() SAL_OVERRIDE;
 
     void            StopEditShell();
     bool            IsDrawTextShell() const;
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index 87e326d..63a6d22 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -571,39 +571,6 @@ bool isGL3DDiagram( const css::uno::Reference<css::chart2::XDiagram>& xDiagram )
 
 }
 
-void ScTabViewShell::AddOpenGLChartWindows()
-{
-    ScDocument* pDoc = GetViewData().GetDocument();
-    ScGridWindow* pParentWindow = GetActiveWin();
-
-    std::vector<std::pair<uno::Reference<chart2::XChartDocument>, Rectangle> > aCharts = pDoc->GetAllCharts();
-
-    for(std::vector<std::pair<uno::Reference<chart2::XChartDocument>, Rectangle> >::iterator itr = aCharts.begin(),
-            itrEnd = aCharts.end(); itr != itrEnd; ++itr)
-    {
-        if(!itr->first.is())
-            return;
-        OpenGLWindow* pOpenGLWindow = new OpenGLWindow(pParentWindow);
-
-        pOpenGLWindow->Show(false);
-        Size aSize = itr->second.GetSize();
-        Size aWindowSize = pOpenGLWindow->LogicToPixel( aSize, MapMode( MAP_100TH_MM ) );
-
-        pOpenGLWindow->SetSizePixel(aWindowSize);
-        Point aPos = itr->second.TopLeft();
-        pOpenGLWindow->SetPosPixel(pOpenGLWindow->LogicToPixel(aPos, MapMode(MAP_100TH_MM)));
-        pParentWindow->AddChildWindow(pOpenGLWindow);
-        uno::Reference< chart2::X3DChartWindowProvider > x3DWindowProvider( itr->first, uno::UNO_QUERY_THROW );
-        sal_uInt64 nWindowPtr = reinterpret_cast<sal_uInt64>(pOpenGLWindow);
-        x3DWindowProvider->setWindow(nWindowPtr);
-
-        if(isGL3DDiagram(itr->first->getFirstDiagram()))
-        {
-            x3DWindowProvider->update();
-        }
-    }
-}
-
 // DoReadUserData is also called from ctor when switching from print preview
 
 void ScTabViewShell::DoReadUserData( const OUString& rData )
diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx
index 858bfa7..e42950b 100644
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@ -244,11 +244,6 @@ ErrCode ScTabViewShell::DoVerb(long nVerb)
     return nErr;
 }
 
-void ScTabViewShell::Initialize()
-{
-    AddOpenGLChartWindows();
-}
-
 void ScTabViewShell::DeactivateOle()
 {
     // deactivate inplace editing if currently active
commit b7e962ebc22efb47fff72fe0cdda844ef2434989
Author: Zolnai Tamás <tamas.zolnai at collabora.com>
Date:   Mon Aug 11 14:56:50 2014 +0200

    Fix regression in rendering of GL3DBarChart
    
    Change-Id: Ibf8f4a57cbc85f77a73054873030fcef321f5518

diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx
index ae91356..75449b4 100644
--- a/chart2/source/view/charttypes/GL3DBarChart.cxx
+++ b/chart2/source/view/charttypes/GL3DBarChart.cxx
@@ -451,8 +451,7 @@ GL3DBarChart::GL3DBarChart(
     Size aSize;
     if (mpWindow)
     {
-        mpWindow->setRenderer(this);
-        Size aSize = mpWindow->GetSizePixel();
+        aSize = mpWindow->GetSizePixel();
     }
     mpRenderer->SetSize(aSize);
     mpWindow->setRenderer(this);
@@ -565,7 +564,7 @@ void GL3DBarChart::create3DShapes(const boost::ptr_vector<VDataSeries>& rDataSer
                         BarInformation(glm::vec3(nXPos, nYPos, float(nVal/nMaxVal)),
                             nVal, nIndex, nSeriesIndex)));
 
-            //maShapes.push_back(new opengl3D::Bar(mpRenderer.get(), aBarPosition, nColor, nId));
+            maShapes.push_back(new opengl3D::Bar(mpRenderer.get(), aBarPosition, nColor, nId));
             nId += ID_STEP;
         }
 


More information about the Libreoffice-commits mailing list