summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2015-03-20 12:36:09 +0200
committerTor Lillqvist <tml@collabora.com>2015-03-20 12:52:31 +0200
commita84456142ae1f578b3d02550df6a1d749c372028 (patch)
tree912b180a585de4f6da869d8ef09cc079e9ab8053 /desktop
parent1dc47816ac137d9bd5ce2070fdec1ddebebcbbd3 (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')
-rw-r--r--desktop/Library_sofficeapp.mk1
-rw-r--r--desktop/source/lib/init.cxx25
2 files changed, 6 insertions, 20 deletions
diff --git a/desktop/Library_sofficeapp.mk b/desktop/Library_sofficeapp.mk
index 985e55eadfc0..91c7a51abf1e 100644
--- a/desktop/Library_sofficeapp.mk
+++ b/desktop/Library_sofficeapp.mk
@@ -14,7 +14,6 @@ $(eval $(call gb_Library_set_include,sofficeapp,\
-I$(SRCDIR)/desktop/inc \
-I$(SRCDIR)/desktop/source/inc \
-I$(SRCDIR)/desktop/source/deployment/inc \
- -I$(SRCDIR)/vcl/inc \
))
$(eval $(call gb_Library_add_libs,sofficeapp,\
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;
}
}