[Libreoffice-commits] .: 2 commits - sc/source

Kohei Yoshida kohei at kemper.freedesktop.org
Thu Jul 14 12:36:55 PDT 2011


 sc/source/ui/view/output.cxx |   15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

New commits:
commit cdb8cf074c8536aa3ea30102bcb9b34feda21833
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Thu Jul 14 13:03:04 2011 -0400

    fdo#36688: Make sure the drawing layer is initialized before use.
    
    From how it's used, it appears to be the convention to call
    InitDrawLayer() before getting the drawing layer pointer, to ensure
    that the drawing layer is present when needed.

diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index ba2db91..ede4006 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -1634,6 +1634,7 @@ void ScOutputData::DrawRotatedFrame( const Color* pForceColor )
 
 drawinglayer::processor2d::BaseProcessor2D* ScOutputData::CreateProcessor2D( )
 {
+    pDoc->InitDrawLayer(pDoc->GetDocumentShell());
     ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer();
     if (!pDrawLayer)
         return NULL;
commit b545d3a3c427a2f42377f1cd3dd30bc5eeb36cda
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Thu Jul 14 12:08:08 2011 -0400

    Reverted 70af08e849a93d56915b7abe14537facf1022a6a.

diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 4d7c2b5..ba2db91 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -52,7 +52,6 @@
 #include <basegfx/matrix/b2dhommatrix.hxx>
 #include <svx/sdr/contact/objectcontacttools.hxx>
 #include <svx/unoapi.hxx>
-#include <svx/svdpage.hxx>
 
 #include "output.hxx"
 #include "document.hxx"
@@ -1635,22 +1634,17 @@ void ScOutputData::DrawRotatedFrame( const Color* pForceColor )
 
 drawinglayer::processor2d::BaseProcessor2D* ScOutputData::CreateProcessor2D( )
 {
-    SdrModel aModel;
-    SfxItemPool& rPool = aModel.GetItemPool();
-    rPool.FreezeIdRanges();
-
-    SdrPage aSdrPage( aModel );
-
     ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer();
-    if ( pDrawLayer )
-        aSdrPage = *pDrawLayer->GetPage( static_cast< sal_uInt16 >( nTab ) );
+    if (!pDrawLayer)
+        return NULL;
 
     basegfx::B2DRange aViewRange;
+    SdrPage *pDrawPage = pDrawLayer->GetPage( static_cast< sal_uInt16 >( nTab ) );
     const drawinglayer::geometry::ViewInformation2D aNewViewInfos(
             basegfx::B2DHomMatrix(  ),
             pDev->GetViewTransformation(),
             aViewRange,
-            GetXDrawPageForSdrPage( &aSdrPage ),
+            GetXDrawPageForSdrPage( pDrawPage ),
             0.0,
             uno::Sequence< beans::PropertyValue >() );
 


More information about the Libreoffice-commits mailing list