[PATCH] fdo#36688: Fixed undisplayed calc page and header / footer borders
Cédric Bosdonnat
cedric.bosdonnat.ooo at free.fr
Wed May 18 03:04:28 PDT 2011
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
--=-rRdK7hskncz/vfAnRckk--
More information about the LibreOffice
mailing list