diff options
author | Tor Lillqvist <tml@collabora.com> | 2015-03-20 12:36:09 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2015-03-20 12:52:31 +0200 |
commit | a84456142ae1f578b3d02550df6a1d749c372028 (patch) | |
tree | 912b180a585de4f6da869d8ef09cc079e9ab8053 /desktop/source/lib | |
parent | 1dc47816ac137d9bd5ce2070fdec1ddebebcbbd3 (diff) |
Don't include vcl's private include files in desktop
Introduce a handful of small public wrapper functions.
Change-Id: I80e1e35d09675112d67b831f3efda483e709b540
Diffstat (limited to 'desktop/source/lib')
-rw-r--r-- | desktop/source/lib/init.cxx | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index df4593f98925..c29223b73baf 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -40,6 +40,7 @@ #include <com/sun/star/ucb/XUniversalContentBroker.hpp> #include <vcl/svapp.hxx> +#include <vcl/svpforlokit.hxx> #include <tools/resmgr.hxx> #include <tools/fract.hxx> #include <vcl/graphicfilter.hxx> @@ -52,15 +53,6 @@ #include <app.hxx> -#if defined(UNX) && !defined(MACOSX) && !defined(ENABLE_HEADLESS) -// Let's grab the SvpSalInstance and SvpSalVirtualDevice -#include <headless/svpinst.hxx> -#include <headless/svpframe.hxx> -#include <headless/svpvd.hxx> - -#include <basebmp/bitmapdevice.hxx> -#endif - #include "../app/cmdlineargs.hxx" // We also need to hackily be able to start the main libreoffice thread: #include "../app/sofficemain.h" @@ -613,9 +605,7 @@ void doc_paintTile (LibreOfficeKitDocument* pThis, #if defined(UNX) && !defined(MACOSX) && !defined(ENABLE_HEADLESS) #ifndef IOS - ImplSVData* pSVData = ImplGetSVData(); - SvpSalInstance* pSalInstance = static_cast< SvpSalInstance* >(pSVData->mpDefInst); - pSalInstance->setBitCountFormatMapping( 32, ::basebmp::FORMAT_THIRTYTWO_BIT_TC_MASK_RGBA ); + InitSvpForLibreOfficeKit(); VirtualDevice aDevice(0, Size(1, 1), (sal_uInt16)32); boost::shared_array< sal_uInt8 > aBuffer( pBuffer, NoDelete< sal_uInt8 >() ); @@ -626,10 +616,7 @@ void doc_paintTile (LibreOfficeKitDocument* pThis, pDoc->paintTile(aDevice, nCanvasWidth, nCanvasHeight, nTilePosX, nTilePosY, nTileWidth, nTileHeight); - SvpSalVirtualDevice* pSalDev = static_cast< SvpSalVirtualDevice* >(aDevice.getSalVirtualDevice()); - basebmp::BitmapDeviceSharedPtr pBmpDev = pSalDev->getBitmapDevice(); - - *pRowStride = pBmpDev->getScanlineStride(); + *pRowStride = GetRowStrideForLibreOfficeKit(aDevice.getSalVirtualDevice()); #else SystemGraphicsData aData; aData.rCGContext = reinterpret_cast<CGContextRef>(pBuffer); @@ -710,16 +697,16 @@ static void doc_registerCallback(LibreOfficeKitDocument* pThis, static void doc_postKeyEvent(LibreOfficeKitDocument* /*pThis*/, int nType, int nCharCode, int nKeyCode) { #if defined(UNX) && !defined(MACOSX) && !defined(ENABLE_HEADLESS) - if (SalFrame *pFocus = SvpSalFrame::GetFocusFrame()) + if (SalFrame *pFocus = GetSvpFocusFrameForLibreOfficeKit()) { KeyEvent aEvent(nCharCode, nKeyCode, 0); switch (nType) { case LOK_KEYEVENT_KEYINPUT: - Application::PostKeyEvent(VCLEVENT_WINDOW_KEYINPUT, pFocus->GetWindow(), &aEvent); + Application::PostKeyEvent(VCLEVENT_WINDOW_KEYINPUT, GetSalFrameWindowForLibreOfficeKit(pFocus), &aEvent); break; case LOK_KEYEVENT_KEYUP: - Application::PostKeyEvent(VCLEVENT_WINDOW_KEYUP, pFocus->GetWindow(), &aEvent); + Application::PostKeyEvent(VCLEVENT_WINDOW_KEYUP, GetSalFrameWindowForLibreOfficeKit(pFocus), &aEvent); break; } } |