From 04d5b861f8aa3d2d6027b4e4a580a20ae82ee54a Mon Sep 17 00:00:00 2001 From: Andrzej Hunt Date: Fri, 23 May 2014 20:00:58 +0100 Subject: Upgrade LibLO tiled rendering to RGBA. This is the expected format for gtk+ pixbufs which is currently the primary target. We could potentially allow the user to choose the format via LibLO -- but we want to eventually allow passing in a buffer (rather than passing out an LO owned buffer) anyway, so should add that then. Change-Id: I8427925a94366917fa82fb8ea28e7dbb3fa1840d --- desktop/Library_sofficeapp.mk | 1 + desktop/source/lib/init.cxx | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'desktop') diff --git a/desktop/Library_sofficeapp.mk b/desktop/Library_sofficeapp.mk index 06527bb2a086..671ff12ae893 100644 --- a/desktop/Library_sofficeapp.mk +++ b/desktop/Library_sofficeapp.mk @@ -54,6 +54,7 @@ $(eval $(call gb_Library_use_libraries,sofficeapp,\ ucbhelper \ utl \ vcl \ + vclplug_svp \ $(gb_UWINAPI) \ )) diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 252d79bc7faa..8f3bda47e410 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -53,7 +53,10 @@ #include #include -// And let's also grab the SvpSalVirtualDevice +#include + +// And let's also grab the SvpSalInstance and SvpSalVirtualDevice +#include #include #include @@ -430,7 +433,11 @@ static unsigned char* doc_paintTile (LibreOfficeKitDocument* pThis, SwDoc* pDoc = pDocShell->GetDoc(); SwViewShell* pViewShell = pDoc->GetCurrentViewShell(); - VirtualDevice aDevice(0, (sal_uInt16)0); + ImplSVData* pSVData = ImplGetSVData(); + SvpSalInstance* pSalInstance = static_cast< SvpSalInstance* >(pSVData->mpDefInst); + pSalInstance->setBitCountFormatMapping( 32, ::basebmp::FORMAT_THIRTYTWO_BIT_TC_MASK_RGBA ); + + VirtualDevice aDevice(0, (sal_uInt16)32); pViewShell->PaintTile(aDevice, nCanvasWidth, nCanvasHeight, nTilePosX, nTilePosY, nTileWidth, nTileHeight); -- cgit