diff options
author | Andrzej Hunt <andrzej.hunt@collabora.com> | 2014-05-23 20:00:58 +0100 |
---|---|---|
committer | Andrzej Hunt <andrzej.hunt@collabora.com> | 2014-06-25 13:04:29 +0100 |
commit | 04d5b861f8aa3d2d6027b4e4a580a20ae82ee54a (patch) | |
tree | 0bb1f330e99ab2b5c2c3031577acfe435c1b223b /desktop | |
parent | e82d491263edf18fadf7c403f60e2895887fe971 (diff) |
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
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/Library_sofficeapp.mk | 1 | ||||
-rw-r--r-- | desktop/source/lib/init.cxx | 11 |
2 files changed, 10 insertions, 2 deletions
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 <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); |