Kaydet (Commit) 04d5b861 authored tarafından Andrzej Hunt's avatar Andrzej Hunt

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
üst e82d4912
......@@ -54,6 +54,7 @@ $(eval $(call gb_Library_use_libraries,sofficeapp,\
ucbhelper \
utl \
vcl \
vclplug_svp \
$(gb_UWINAPI) \
))
......
......@@ -53,7 +53,10 @@
#include <unotxdoc.hxx>
#include <viewsh.hxx>
// And let's also grab the SvpSalVirtualDevice
#include <salinst.hxx>
// And let's also grab the SvpSalInstance and SvpSalVirtualDevice
#include <headless/svpinst.hxx>
#include <headless/svpvd.hxx>
#include <basebmp/bitmapdevice.hxx>
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment