Hello all,

Here is a fix for a regression (neither crash nor anything seriously
damaging the program). It's just displaying some missing borders in
calc.

Could you review, sign-off and push to the 3.4.0 branch (or 3.4 if more
appropriate)?

Thanks,

-- 
Cédric Bosdonnat
LibreOffice hacker
http://documentfoundation.org
OOo Eclipse Integration developer
http://cedric.bosdonnat.free.fr
>From 1099c5b85c8ed11ee23b5babf7d48ddb3c5d53df Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= <cedric.bosdonnat....@free.fr>
Date: Wed, 18 May 2011 12:04:28 +0200
Subject: [PATCH] fdo#36688: Fixed undisplayed calc page and header / footer borders

When displaying the page, header and footer borders, calc uses a fake
ScDocument with no drawing page. Create a new SdrPage if none can be
fetched from the ScDocument to create the primitive processor.
---
 sc/source/ui/view/output.cxx |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index f37a2c8..22b5d24 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -52,6 +52,7 @@
 #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"
@@ -1634,17 +1635,19 @@ void ScOutputData::DrawRotatedFrame( const Color* pForceColor )
 
 drawinglayer::processor2d::BaseProcessor2D* ScOutputData::CreateProcessor2D( )
 {
+    SdrModel aModel;
+    SdrPage aSdrPage( aModel );
+
     ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer();
-    if (!pDrawLayer)
-        return NULL;
+    if ( pDrawLayer )
+        aSdrPage = *pDrawLayer->GetPage( static_cast< sal_uInt16 >( nTab ) );
 
     basegfx::B2DRange aViewRange;
-    SdrPage *pDrawPage = pDrawLayer->GetPage( static_cast< sal_uInt16 >( nTab ) );
     const drawinglayer::geometry::ViewInformation2D aNewViewInfos(
             basegfx::B2DHomMatrix(  ),
             pDev->GetViewTransformation(),
             aViewRange,
-            GetXDrawPageForSdrPage( pDrawPage ),
+            GetXDrawPageForSdrPage( &aSdrPage ),
             0.0,
             uno::Sequence< beans::PropertyValue >() );
 
-- 
1.7.3.4

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to