[Libreoffice-commits] .: Branch 'libreoffice-3-4' - sc/source

Kohei Yoshida kohei at kemper.freedesktop.org
Wed May 18 08:44:31 PDT 2011


 sc/source/ui/view/output.cxx |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit 70af08e849a93d56915b7abe14537facf1022a6a
Author: Cédric Bosdonnat <cedric.bosdonnat.ooo at free.fr>
Date:   Wed May 18 12:04:28 2011 +0200

    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.
    
    Signed-off-by: Kohei Yoshida <kyoshida at novell.com>

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 >() );
 


More information about the Libreoffice-commits mailing list